TfrUserDataSet

Greetings,

I am currently evaluating FR2.51 and I can't find any example of how to use the OnFirst, OnNext and OnPrior events of a TfrUserDataSet. Would anyone know where I can find a good one?

Also, according to the documentation, it appears that I might not even need to use those events at all if I know the exact number of records contained in my TfrUserDataSet. However, even though I set the RangeBegin, RangeEnd and RangeEndCount of my TfrUserDataSet to rbFirst, reCount and 100 respectively, the OnGetValue event of my TfrReport doesn't get called even once. Any idea about what it is that I am doing wrong?

Thank you.

Philippe

Comments

  • edited 8:25AM
    Never mind folks, I finally managed to figure it all out. My OnGetValue event wouldn't get called simply because I was using a Detail Data band instead of a Master Data band in my report. It all works perfectly now.

    I even figured out the purpose of the OnFirst and OnNext events of a TfrUserDataSet. Interestingly enough, the OnNext event is called once for each row in the report which allows you to prepare all the information for the next series of TfrReport.OnGetValue calls which in turn are done once for each column in the row. Very useful if you need to do any preparation at the row level. Also, I've noticed that if the Two-pass report option is selected then the OnNext event is called in both passes while the OnGetValue event is called only in the second pass; something that might be worth knowing.

    At this point, after evaluating all the major report tools for Delphi, I think that FastReport is probably the best. I only wish it would have better documentation however. I hope this last comment can be taken positively ;)

    Philippe
  • gordkgordk St.Catherines On. Canada.
    edited 8:25AM
    Hi
    don't forget to write an on previous event handler to dec the index you incremented in the on next event handler.
    regards ;)

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.