Hi all! Once again, I don’t think this problem it too tough. I am creating a report that summarizes data based on the values in the Payroll Ledger Entry table. In the ReqFilterFields I have selected the “Payroll Control Code” field. As this report is very static, I would like to populate the Filter value for this field with a string of different Codes in the OnPreReport or OnInitReport triggers. Any ideas?
You can predefine your filter settings, but not in the report itself. However, you can set the filter(s) in the OnPush trigger of the button or menu-item you are calling your report from. When followed by a SetRecFilter command, the filter setting will be carried over to the report and shows as “pre-filled” in the RequestFilterform. John
Hi John! Maybe I’m misunderstanding your response. But I don’t want to copy the filter of an existing record and implement it for the report. This report will add the “amount” field from the Payroll Ledger Entry table, and produce subtotals for different “Payroll Control Code” values. But I don’t want all the values, just those required for this specific report. And they will always be the same 5 (or 6) values (client isn’t sure yet). Thus I would like to hard code the values into the report and have them show up in the Filter on the Request Form. If this isn’t possible, I can write something in the Section itself checking the value of “Payroll Control Code” against those that need to be printed, but I was hoping for something the user would be able to see what was happening. cheers, Matt.
Matt, If you apply a filter when calling your report, you get the values in the corresponding fields on the request form. For example, in the OnPush trigger of the button you are calling the report from (or from a menu) you code: PayrollLedgerEntry.Reset; PayrollLedgerEntry.Setfilter(“Payroll Control Code”,‘123/456/789’); PayrollLedgerEntry.SetRecFilter; Report.RunModal(YourReport,True,False,PayrollLedgerEntry); Now the report will have the 123/456/789 filter showing up in the Payroll Control Code field on the request form. If that’s not what you want, than I’m afraid I don’t understand you question John PS: After posting, I see that the vertical bar character is transformed in a “/”. A vertical bar (the sign for OR in a filter) is intended, of course. Edited by - John Tegelaar on 10/26/00 9:06:15 PM
Hi What if I want to set det value of a global variable on the request form when calling the report from a form? How to do that. Thanks
Hi I had forgotten to set the “UpdateOnActivate” to Yes on the request form. That solved the problem Regards