In version 4 we could set a report to "Prompt for Criteria at Print Time" then use the following command to preview (or print) the report:
Report.preview( "ReportName", "Approval_no"1000" )
If the user's criteria at print time was: Status="Approved", the result would be only those records with Status="Approved" AND Approval_no"1000.
In version 5, the result is ALL records with Status="Approved".
Version 5 ignores the filter that is sent with the Report.preview() command. As a result, one of my reports that was 1 page in version 4 is 261 pages in version 5 - oops!!
This made me guess that it might also ignore any filter built into the report but that was not true - built in filters are still used even when the report is set to "Prompt for Criteria at Print Time".
PLEASE NOTE: Putting the filter in the report itself is not an option. The above is just an example. In reality, the script sets the filter and it can be different every time:
filter = "some complex filter set via about 150 lines of code>
Report.preview( "ReportName", filter )
I've talked the customer into switching to v5 and now I need to get the same functionality as before because this feature was used a LOT and is one of the CFO's favorite features. If the filters were simple it would be no big deal for him to enter his own but the 'pre' filter is often very complex.
Anyone know of a way to get the same functionality in version 5 short of running a query on the set and copying the records to a temp table then appending to a 'report' table?
Report.preview( "ReportName", "Approval_no"1000" )
If the user's criteria at print time was: Status="Approved", the result would be only those records with Status="Approved" AND Approval_no"1000.
In version 5, the result is ALL records with Status="Approved".
Version 5 ignores the filter that is sent with the Report.preview() command. As a result, one of my reports that was 1 page in version 4 is 261 pages in version 5 - oops!!
This made me guess that it might also ignore any filter built into the report but that was not true - built in filters are still used even when the report is set to "Prompt for Criteria at Print Time".
PLEASE NOTE: Putting the filter in the report itself is not an option. The above is just an example. In reality, the script sets the filter and it can be different every time:
filter = "some complex filter set via about 150 lines of code>
Report.preview( "ReportName", filter )
I've talked the customer into switching to v5 and now I need to get the same functionality as before because this feature was used a LOT and is one of the CFO's favorite features. If the filters were simple it would be no big deal for him to enter his own but the 'pre' filter is often very complex.
Anyone know of a way to get the same functionality in version 5 short of running a query on the set and copying the records to a temp table then appending to a 'report' table?
Comment