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

AV when using Dynamic Subreport Loading

edited February 2006 in Subreports
Hi,

I tested using the Dynamic Subreport Loading demo (5. Dynamic Subreport
Loading) but get an AV while testing.

These are the steps I take for the AV:

- Start the demo 5. Dynamic Subreport Loading
- Open new report from report explorer
- Place 'Dynamic Loading Subreport' in the header
- Select 'Dynamic Header Template' tab to view the subreport
- Preview the report
- Select the Design tab and move the mouse over the report area --> AV

Using D7, RB7.04

Regards,
Jeroen R?ttink

Comments

  • edited February 2006

    When I tried this I encountered a 'record not found' error.

    I also encountered some issues with RB 10.

    The next maintenance release for RB 10 will contain some mods to get this
    all working correctly.

    As part of our QA, we test the demos prior to releasing. However, looks like
    some operations that can be performed within the context of this demo are
    not working correctly - sorry about that.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    Hi Nard,

    I can get the 'record not found' error if I take the following steps:

    - create new report
    - place 'Dynamic Loading Subreport' in the header
    - turn to the preview window (content is not correct)
    - go back to the design tab
    - select 'Dynamic Header Template' tab to view the subreport
    - turn to the preview window --> 'Record not found: myHeaderTemplate'

    I asume you got this error.
    The thing is I knew about this a long time (years) and everytime thought
    'too busy now. 'll report it later'. My fault.

    Regards,
    Jeroen R?ttink


  • edited February 2006
    Hi Nard,

    I saw the release notes for 10.1 mention that the demo code was changed. Is
    it only the demo code that has changed or is it also a fix in RB10. If it's
    only the demo can you tell me what has changed?

    Regards,
    Jeroen R?ttink


  • edited February 2006

    Changed some RB source code and the demo.

    RB 10 contains a new designer and a re-design of the ReportExplorer logic
    related to managing and loading the rbItems data. The ReportExplorer
    performance can be optimized by using two linked queries on the rbItems tabe
    (a query on the rbItem table that does not contain the template (blob) and a
    second query linked query that does contain the template (blob).) All of the
    RB 10 EndUser examples were updated to show the new optimization.






    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    This now works ok in 10.01 for simple subreports. I would like to connect my
    dynamic subreport to a data pipeline as well. But when I preview a report
    containing this dynamic subreport the first time I get 'No SQL statement
    available'.
    Second time the preview is fine.
    Printing such report also gives a related error.

    What am I missing here? Aren't the DADE automaticly objects merged with the
    main report?

    Using RB 10.01 Ent, D7

    Regards,
    Jeroen R?ttink.


  • edited March 2006

    I researched this and it is a timing issue. See TppEngine.Init
    (ppEngine.pas), it opens that datapipelines and then calls start of main
    report.

    Therefore the subreport templates need to loaded earlier if they contain
    datapipelines.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Nard,

    Which subreport event or method could be used for this purpose? Looking at
    TppEngine.Init() there doesn't seem to happen a lot before
    OpenDataPipelines() which could be overwritten.

    Regards,
    Jeroen R?ttink


  • edited March 2006
    Nard,

    Any news on this one?

    Regards,
    Jeroen.

  • edited March 2006

    I researched this but did not find a solution.

    An alternative would be to load the subreport templates prior to calling
    Report.Print or load them in the Report.OnInitializeParameters event - this
    event occurs very early, but is not available for subreport/childreports.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.