Sorting a frxUserDataSet

I’m working on porting our Delphi app from VCL to FMX so I’m looking at switching from Digital Metaphor’s Report Builder to FastReport but I’m hung up on something that’s probably very simple. All of our data is stored in objects contained in tObjectLists. There are three “databases” so I created 3 frxUserDataSets  and they’re working just fine. However, I have two questions about the frxUserDataSets:


1)     Report Builder’s equivalent of this component has an OnOpenDataset and a OnCloseDataSet event. These were handy because I was actually populating my tObjectLists when the database was opened (in order to filter records for the report). Is there no event for the opening and closing of the tfrxUserDataSet?


2)     (This one is really the bigger issue) I want the user to be able to dictate, within the report editor, which fields will be sorted on. If they could pick the sort fields and I could retrieve their choices from the report before printing it, I could sort my tObjectList before printing the report. In Report Builder, I was able to add a menu item to the designer menu; that menu item brought up a custom dialog in which they could select the sort order. I’m sure I’m just not grasping the premise of how this is done, but I can’t find anything in the documentation about sorting frxUserDataSets

Comments

  • 1) Try to yse TfrxUserDatasen.OnFirst event

  • The OnFirst event would work, except that creating the ObjectList takes quite a bit of grinding through data and I believe that process would be repeated unnessasarly; it seems to be triggered more than once in the printing of a report. I could brute-force around that problem, but it'd be nice to have those events for the frxUserDataSet since the frxDBDataSet has them.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.