Any way of creating a JIT JIT report?
Is there any technique or event I can use that will allow me to fetch/set
the data for a detail JIT pipeline "just in time" (as the report is
progressing) without having to build the report in memory before hand?
I'd like for the report to behave like to master/detail datasets where the
detail information is not fetched until the master changes. But I can't seem
to find an event that's triggered at the proper time to allow me to fill in
the detail pipeline's RecordCount and RecordIndex. I can get JIT pipelines
to work fine for two level reports, but three or more levels and the
pipelines get confused.
Thanks,
Robert Gesswein
the data for a detail JIT pipeline "just in time" (as the report is
progressing) without having to build the report in memory before hand?
I'd like for the report to behave like to master/detail datasets where the
detail information is not fetched until the master changes. But I can't seem
to find an event that's triggered at the proper time to allow me to fill in
the detail pipeline's RecordCount and RecordIndex. I can get JIT pipelines
to work fine for two level reports, but three or more levels and the
pipelines get confused.
Thanks,
Robert Gesswein
This discussion has been closed.
Comments
Try using the master datapipeline OnRecordPositionChange event to update the
detail datapipeline.
example
myDetailJITPipeline.Close;
myDetailJITPipeline.RecordCount := X;
myDetailJITPipeline.Open;
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I've rewritten my report to your method below but am running into the
following problems.
1. The OnRecordPositionChange event seems to be called an indeterminate (by
me, not the application) number of times where the position is either the
same as it was the last time or sometimes even moving backwards then
forwards again. Do I need to do something special with these multiple
changes to the same row?
2. I can get report/subreport levels 1 and 2 to show the correct data, but
levels 3,4, and 5 do not get the proper child RecordIndex numbers. (Maybe
due to #1?) In some cases I have multiple sub-reports in a single detail
band. Could that be causing unexpected problems? Would I need to perform
extra checking of any sort for these bands?
Thanks,
Robert Gesswein
Yes, OnRecordPositionChange can fire frequently. Your event-handler needs to
update the immediate detail JITPipeline and then update each of the
subdetail JITPipelines in a chain like fashion.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
row triggers a change to the same row? As mentioned, this happens often
(sometimes 5 or 6 times in a row) and closing a pipeline, setting it, and
reopening it causes all next level child pipelines to have their row change
events triggered. For my report this causes the time to preview the report
to more than triple because of all the extra data fetching.
My test report seems to work OK if I check to see if the
OnRecordPositionChange is changing to the same row and exiting the event if
it is. But I don't know if this will hold for all reports. Otherwise my
report goes from a tolerable 3-4 min. to an annoying 10+ min. to fully
render in the preview.
--Robert Gesswein
Okay, well I could be incorrect about that need to update all of the detail
pipelines then. Just do some testing and take it from there.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com