FR User Functions to control Delphi data?
ksihota
Victoria, BC Canada
Is it possible to build Sort/Filter procedures in Delphi code that Sort/Filter a Delphi string grid, then add them to FR's functions and call them within an FR report to sort or filter the data coming into the report? The Sorting/Filter choices would be controlled using an FR dialog.
Currently I sort and filter before a report is created but I was wondering if this was also possible just using FR.
Thanks for any help/suggestions.
This was also posted on the FR newsgroup.
Kim
Currently I sort and filter before a report is created but I was wondering if this was also possible just using FR.
Thanks for any help/suggestions.
This was also posted on the FR newsgroup.
Kim
Comments
I tried it out but it did not appear to work. I thought maybe that a procedure acting on a Delphi component that was called by the FR dialog prior to getting the actual data might work.
I don't want to spend more time trying to get it to work if it simply won't because of how FR and Delphi work together.
Anyone?
Best regards
My data comes from a Delphi AdvStringGrid using an FrUserDataset. In order to display the report properly the table data needs to be sorted and filtered. This can be done within the Delphi program before the report is called but users are not necessarily 'with it' enough to do this step first. I was hoping that I could write a report that included a dialog in FR which would allow me to set up the proper sort and filters rather than through the application (as this is a specialized report.)
I thought that since a Delphi function could be used within FR then possibly a Delphi procedure could be controlled from the FR dialog to return the sorted and filtered data. I guess the FRUserDataset has already been populated and will therefore not be updated by any procedure called within FR. I guess my only options are to either script the sorting and filtering within FR (looks rather complicated) or simply add a specialized 'Easy' button for the client that would perform the sorting and filtering first (easiest fix but not very elegant.) I will look into how I might code the report to see if there is something I could do re sorting/filters before I change the application.
Thanks again for your help.
Kim
From the report script you can call MyIntToHexFunction.
Best Regards,
Cristian Peta
I have a function for filtering and one similar for sorting.
dl is a TDataModule
Best Regards,
Cristian Peta