Pass Datefilter as parameter to dynamically run the report.


I need to run the Customer Statement report with predefined date filter, how to pass the Date Filter in the request page of the customer statement report.

Actually my requirement is to send customer statement as PDF attachment to multiple customers. So I have created process only report with customer dateitem and in the customer onaftergetrecord trigger i want to save the customer statement report in PDF format and send mail to the customer. Here am unable to pass the Date filter parameter from one report to other.

Please advice.


In the customer statement Report create a function called SetDateFilter parameter StartDate type Date
Create a global variable called SetNewDate, in the SetdateFilter function
SetNewdate := startdate

OnPreDataItem of the report.

You can also pass other parameters to the SetDatefilter function.

create a new variable called CustomerStatement Type Report Customer statement report.

customerstatement.setdatefilter(pass the date value you want to pick)