Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

SubReport in SubReport trouble

edited January 2010 in Subreports
Hi.

I'm using RB 10.06 on Delphi2007 (11.0.2709.7128)

I have the report with group that start new page for each row of my data.
http://i746.photobucket.com/albums/xx106/fws_constrcutor/rb1.jpg
http://i746.photobucket.com/albums/xx106/fws_constrcutor/rb2.jpg
On DetailBand i have SubReport (PrintBehavior=pbChild). On SubReport.OnPrint
event i load the template from DB for ChildReport using
Template.LoadFromDatabase method. So for each row i have the different
tamplate in ChildReport. In case when the template consists of SubReport
(with PrintBehavior=pbChild) i have an error when run the report

Exception handle was failed!
Access violation at address 00404E4C in module 'SrMunicipalPayment.exe'.
Read of address FFFFFFD5!

and then

Access violation at address 00A9E088 in module 'SrMunicipalPayment.exe'.
Read of address 0000000D!

When the template that i load havent the SubReports there is no erorr. When
the template have SubReports, but with PrintBehavior=pbSection there is no
error. The same code works on RB 5.0 Delphi 5 with no errors.

Maybe i miss something ?

Many thanks

Comments

  • edited January 2010
    Hello,

    For future reference, please use your real name when posting to these
    newsgroups.

    At what point does the application AV? During the LoadFromFile call? If
    you set your library path to RBuilder\Source, are you able to trace into the
    RB source where the problem occurs?

    I strongly recommend updating your version to RB 10.09. This is a free
    upgrade and can be obtained by contacting info@digital-metaphors.com with
    your serial number and purchasing email address.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2010
    Hi
    I have AV when call Report.Print. All templates loaded successfull. The call
    stack is very long and i think is useless here.
    The exact point of AV in procedure TppSubReport.GenerateReport in finally
    block, on last event-handler restore

    finally

    {if report cancelled or exception raised, reset generator}
    if FReport.Engine.StopPrinting then
    FReport.Engine.Reset
    else
    FReport.Engine.Printing := True;

    lPageRequest.Free;

    {restore original event-handlers}
    FReport.Engine.OnResetCache := TNotifyEvent(lSaveOnResetCache);
    FReport.Engine.OnReadCache := TNotifyEvent(lSaveOnReadCache);
    FReport.Engine.OnWriteCache := TNotifyEvent(lSaveOnWriteCache);
    FReport.Engine.OnGetLastPageCached :=
    TppGetLastPageCachedEvent(lSaveOnGetLastPageCached); <<---- Here!
    end; {try, finally}
  • edited January 2010
    For future reference, please use your real full name when posting to these
    newsgroups.

    Did you upgrade your version of ReportBuilder to 10.09?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2010

    I have install the RB 11.02 Trial, and have the same error

  • edited January 2010
    And i have one more trouble. When i have more than 2 records in my data, on
    Preview form normally displays only first 2 records, and the 3 page is
    empty. I click next several times, and have my 3 row on 5 page, 3-4 are
    empty(

  • edited January 2010
    Please update your posting name. Your questions will no longer be answered
    until you do so.

    http://www.digital-metaphors.com/support/newsgroups.html

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.