How to filter automatically a query?

We've a report that iterates a table called "orders". We've also a table called "addresses" that has multple addresses for each customer of these orders.

We want to get a report that lists some orders with the specific address that the customer chose. So, we have an ADOQuery inside the fr3 file: select * from address where id = :addorder

And addorder is a parameter that is linked with <frxOrder."address"> (a field of the orders table). The first day it worked fine: for each row, FastReport refreshed the query to get the correct address. But the next days it stopped working: it got the address for the first order and then it didn't refresh the query.

We solved it by refreshing manually the query on the "onBeforePrint" event of the band; but, how can we do that automatically? (in fact, first day it worked without manual refresh).

Best Regards

David Rodr?­guez

Comments

  • edited 10:39AM
    davidrgh wrote: »
    ...
    but, how can we do that automatically? (in fact, first day it worked without manual refresh).
    Check if you set a "slave" ADOQuery.Master property. It should point to your frxOrder ADOQuery.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.