Problems after Update from 6.02 to 6.03
I have deinstalled the ReportBuilder by exactly following the instructions
and installed RB again.
The problem persists.
The first time I call the TppReport.Print method the (DeviceType = dtScreen)
the PrintPreview is shown normal. After closing the PrintPreview and trying
to open it again the AV occurs.
Before calling the TppReprt.Print method we do the follwing:
Initializing
- creating a variable amount of TIBQuery and TppDBPipelines dynamically
- TppReport.Template.ResetDevices
- TppReport.Template.Reset
- TppReport.Template.LoadFromFile
- TppReport.Printer.Initialize
Opening Datasets
- Setting AutoCreateFields of all TppDBPipeLines to True
- Open all Querys with Unidirectional-prop set to True
... then we call Print (ModalPreview is set to True)
after closing the PrintPreview we do the following
- close all Querys
- set AutoCreateFields of all TppDBPipeLines to False
- Free all dynamically created components (TIBQuerys and TppDBPipeLines)
- TppReport.ResetDevices
- TppReport.Reset
Debugging the code I've found the following snippet. The AV occurs when
calling "lDataPipeline.CheckLinkedData", "lDataPipeline.IsLinked".
{ TppDataPipeline.CheckDetailData }
function TppDataPipeline.CheckDetailData: Boolean;
var
liIndex: Integer;
lDataPipeline: TppDataPipeline;
begin
if (FDetailPipelines = nil) or not(FDetailSkip) then
Result := True
else
begin
Result := False;
{check all details, to see if any have data}
liIndex := 0;
while not(Result) and (liIndex < FDetailPipelines.Count) do
begin
lDataPipeline := TppDataPipeline(FDetailPipelines[liIndex]);
// Here!
if (ppdaNoRecords in lDataPipeline.State) or
(lDataPipeline.IsLinked and (lDataPipeline.CheckLinkedData <>
0)) then
Inc(liIndex)
else
Result := True;
end;
end;
end; {function, CheckDetailData}
Thanks
===============================END of MESSAGE =======================
and installed RB again.
The problem persists.
The first time I call the TppReport.Print method the (DeviceType = dtScreen)
the PrintPreview is shown normal. After closing the PrintPreview and trying
to open it again the AV occurs.
Before calling the TppReprt.Print method we do the follwing:
Initializing
- creating a variable amount of TIBQuery and TppDBPipelines dynamically
- TppReport.Template.ResetDevices
- TppReport.Template.Reset
- TppReport.Template.LoadFromFile
- TppReport.Printer.Initialize
Opening Datasets
- Setting AutoCreateFields of all TppDBPipeLines to True
- Open all Querys with Unidirectional-prop set to True
... then we call Print (ModalPreview is set to True)
after closing the PrintPreview we do the following
- close all Querys
- set AutoCreateFields of all TppDBPipeLines to False
- Free all dynamically created components (TIBQuerys and TppDBPipeLines)
- TppReport.ResetDevices
- TppReport.Reset
Debugging the code I've found the following snippet. The AV occurs when
calling "lDataPipeline.CheckLinkedData", "lDataPipeline.IsLinked".
{ TppDataPipeline.CheckDetailData }
function TppDataPipeline.CheckDetailData: Boolean;
var
liIndex: Integer;
lDataPipeline: TppDataPipeline;
begin
if (FDetailPipelines = nil) or not(FDetailSkip) then
Result := True
else
begin
Result := False;
{check all details, to see if any have data}
liIndex := 0;
while not(Result) and (liIndex < FDetailPipelines.Count) do
begin
lDataPipeline := TppDataPipeline(FDetailPipelines[liIndex]);
// Here!
if (ppdaNoRecords in lDataPipeline.State) or
(lDataPipeline.IsLinked and (lDataPipeline.CheckLinkedData <>
0)) then
Inc(liIndex)
else
Result := True;
end;
end;
end; {function, CheckDetailData}
Thanks
===============================END of MESSAGE =======================
This discussion has been closed.
Comments
A quick glance thru this e-mail and one thing pops out me. You are
trying to use unidirectional datasets. Sorry, but ReportBuilder does not
support unidirectional datasets. Try setting Query.Unidirectional to
False and retest.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
the problem persists.
To remind the AV occurs after closing the PreviewForm and opening it again.
The first time I open the PrintPreview everything works fine. So I think the
problem is caused by freed ressources that are accessed when I call Print
again.
Good to know that RB doesn't support Unidirectinal Datasets. Setting
unidirectional to True was a workaround of an EOutOfMemory-Exception
occuring when printing very large reports.
Sorry, but do not know what would cause this. Try to create a simple
Delphi project that demonstrates this issue and e-mail to
support@digital-metaphors.com. Then we can run it in the debugger.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com