I have following structure:
InvoicesPeriod *<->1 Customer 1<->* Invoices
InvoicesPeriod contains properties: Customer, DateFrom, DateTo.
I want to create a report based on InvoicesPeriod. Then I want DetailReport based on InvoicesPeriod.Customer.Invoices, but I want to filter invoices by InvoicesPeriod.DateFrom and InvoicesPeriod.DateTo.
I couldn't find a proper string to enter to DetailReport's Filter property to achieve that.
I believe the simplest way to accomplish this task is to use Report Parameters for filtering. In this way, you will define the DetailReport's FilterString value only once. Then, you will simply change the Parameter values based on your requirements.
For example, you can handle the DetailReportBand.BeforePrint event, access created parameters using the Report.Parameters collection, and pass required values to the Parameter.Value property.
Please try this solution and let me know your results.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.