Strange PDF behaviour
Hi,
I have an interesting problem with a a report that generates PDf files.
Without getting into too much detail just yet I basically open a form enter
some selections and generate a bunch of PDf files, all good. However if I
run the report again without exiting the form I am losing SOME of the
content in the second set of PDF's that print, specifically a subreport on
the detail band. If I exit the form and come back into it and run the report
again - fine. It's only when I run the report a second time (and any
subsequent times) from within the form that I have the issue.
Also, and kind of weird, the last PDF generated in a run is always OK. A
"run" consists of a loop calling the same report.Print method generating the
same report but with refreshed data each time.
I've tried issuing Report.Reset, Report.Engine.Reset, Report.ResetDevices
and Report.CloseDataPipelines after each report.print but this hasn't made
any difference. Any suggestions please?
I'm using Delphi 2010, Report Builder Enterprise 11.08
TIA
Willie
I have an interesting problem with a a report that generates PDf files.
Without getting into too much detail just yet I basically open a form enter
some selections and generate a bunch of PDf files, all good. However if I
run the report again without exiting the form I am losing SOME of the
content in the second set of PDF's that print, specifically a subreport on
the detail band. If I exit the form and come back into it and run the report
again - fine. It's only when I run the report a second time (and any
subsequent times) from within the form that I have the issue.
Also, and kind of weird, the last PDF generated in a run is always OK. A
"run" consists of a loop calling the same report.Print method generating the
same report but with refreshed data each time.
I've tried issuing Report.Reset, Report.Engine.Reset, Report.ResetDevices
and Report.CloseDataPipelines after each report.print but this hasn't made
any difference. Any suggestions please?
I'm using Delphi 2010, Report Builder Enterprise 11.08
TIA
Willie
This discussion has been closed.
Comments
To isolate the issue as a PDF problem or not, try performing the same test
except print the reports to paper or export them to Archives rather than PDF
files. This will let me know if it is a PDF device issue or perhaps a data
issue.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I tried changing it so my PDF routine printed to paper and had the same
issue. It turns out it's maybe not a ReportBuilder issue, without getting
into too much detail I was setting a filter on the main report's
clientdataset (cdsHdr) when doing my PDF generation and not clearing it
again. The subreport that was not printing was fed by a clientdataset that
was a child of cdsHdr, to further complicate the issue these clientdatasets
don't have providers, they are "pre-structured" (i.e. at design time) then
populated on the fly at runtime.
If I cleared the filter after generating my report(s) then the issue
disappeared. So I'm not sure if you want to know any more about it or not?
Also, I'm sorry if I wasted your time with the original post.
regards
Willie
No problem, I'm glad you got the problem sorted. Thanks for posting a
follow-up.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
"Willie" wrote in message news:4cd78cba$1@mail....
Hi Nico,
I tried changing it so my PDF routine printed to paper and had the same
issue. It turns out it's maybe not a ReportBuilder issue, without getting
into too much detail I was setting a filter on the main report's
clientdataset (cdsHdr) when doing my PDF generation and not clearing it
again. The subreport that was not printing was fed by a clientdataset that
was a child of cdsHdr, to further complicate the issue these clientdatasets
don't have providers, they are "pre-structured" (i.e. at design time) then
populated on the fly at runtime.
If I cleared the filter after generating my report(s) then the issue
disappeared. So I'm not sure if you want to know any more about it or not?
Also, I'm sorry if I wasted your time with the original post.
regards
Willie
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com