access violation, successive reports, TppRichEdit
Greetings,
This is complicated, so on the first round, let me ask for an alternative
approach. I have an automated utility that cycles through a table and
creates hundreds to thousands of statements/invoices. Each needs to be
stored separately in a BLOB field for later retrieval. This means that I am
calling Print or PrintToDevices (I have used both in testing) one time for
each statement. I have a loop that sets a filter on the dataset so that the
report "sees" only one record for each call to it.
This has worked fine for months until we lengthened a message that appears
in a TppRichText in the summary band. Once this message forced the report to
two pages (from one), I encounter an access violation at random intervals
that involves the FreeChildren procedure.
I read another post from May 2009 about an access violation with
FreeChildren and there was no solution.
Therefore, could you offer the best way to achieve my goal -- what I really
would like to do is to run one report, and each time a group is traversed (a
group being a specific statement), instead of just starting a new page, it
actually creates a separate output, whether this be a report archive, PDF,
or something else.
If there is no way of achieving this without creating a report over and over
(by calling TppReport.Reset and then TppReport.PrintToDevices), and this all
seems to involve TppRichText, am I doing something wrong by placing it in
the summary band? Is there somewhere else it should be placed?
Any other suggestions would be most helpful. I have spent hours on this and
at best I have been able to increase the number of reports generated before
the AV by using Reset, Application.ProcessMessages and trying different
outputs (PDF, TppArchive, etc). Also, just before I get the AV, I notice
that the memory usage starts to climb -- otherwise, it stays fairly
consistent.
Thank you!
This is complicated, so on the first round, let me ask for an alternative
approach. I have an automated utility that cycles through a table and
creates hundreds to thousands of statements/invoices. Each needs to be
stored separately in a BLOB field for later retrieval. This means that I am
calling Print or PrintToDevices (I have used both in testing) one time for
each statement. I have a loop that sets a filter on the dataset so that the
report "sees" only one record for each call to it.
This has worked fine for months until we lengthened a message that appears
in a TppRichText in the summary band. Once this message forced the report to
two pages (from one), I encounter an access violation at random intervals
that involves the FreeChildren procedure.
I read another post from May 2009 about an access violation with
FreeChildren and there was no solution.
Therefore, could you offer the best way to achieve my goal -- what I really
would like to do is to run one report, and each time a group is traversed (a
group being a specific statement), instead of just starting a new page, it
actually creates a separate output, whether this be a report archive, PDF,
or something else.
If there is no way of achieving this without creating a report over and over
(by calling TppReport.Reset and then TppReport.PrintToDevices), and this all
seems to involve TppRichText, am I doing something wrong by placing it in
the summary band? Is there somewhere else it should be placed?
Any other suggestions would be most helpful. I have spent hours on this and
at best I have been able to increase the number of reports generated before
the AV by using Reset, Application.ProcessMessages and trying different
outputs (PDF, TppArchive, etc). Also, just before I get the AV, I notice
that the memory usage starts to climb -- otherwise, it stays fairly
consistent.
Thank you!
This discussion has been closed.
Comments
For future reference please always include environment information,
including Windows version, Delphi version, ReportBuilder version, data
access components, database engine, printer, etc.
RB 11 introduced a Group.NewFile boolean that can be used to generate each
group to a separate file.
http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_11/Groups
If you can create a simple example project that we can build and run here,
we can research the random AV issue. Send in zip format to support@.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com