TppSubReport & Preview : AV
I just installed RB7 Enterprise for D6 Prof.
When I run Demo '3. EndUser', '5. Dynamic SubReport Loading' and try to
preview the report I get an Access Violation.
Any fixes or workarounds ?
Thanks,
Samuel
When I run Demo '3. EndUser', '5. Dynamic SubReport Loading' and try to
preview the report I get an Access Violation.
Any fixes or workarounds ?
Thanks,
Samuel
This discussion has been closed.
Comments
on. Since the dynamic subreport loading technique in this demo loads the
template after the engine begins generating, you need to reset the
subreport's report's engine after loading the template.
procedure TmyDynamicLoadingSubReport.LoadSubreport;
begin
if (Band is TppTitleBand) then
LoadTitleSubreport
else if (Band is TppHeaderBand) then
LoadHeaderSubreport
else if (Band is TppFooterBand) then
LoadFooterSubreport;
Report.Engine.Reset;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
something in the design tab and then go back to the Preview.
Samuel.
to tell it that it hasn't been initialized because we just loaded a template
without it knowing it.
Instead of Report.Engine.Reset, call these two lines of code in its place in
TmyDynamicLoadingSubReport.LoadSubreport after the tempalte is loaded:
Report.Engine.State := Report.Engine.State - [esInitialized];
Init;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com