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

Access Violation

edited December 2001 in General
Some times an access violation is raised when some reports is print. (It
seems that it's always the same report)

My customer is angry but I didn't find where is.

Can you help me very very soon ?

I use delphi 5 entrepise and rb build 5.56 enterprise version.

Comments

  • edited December 2001
    Could you provide more information about this report? What is happening in
    the report's event handlers? Can you reproduce the problem on your machine?
    Start reducing the complexity/components from the report until the problem
    goes away. Then you can start trying to research what happens when you add
    one condition to the report, which causes the av.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    I have seen AVs after making changes in my table structure or persistent
    fields in my dataset. It seems that I can avoid the AVs if I remove and
    recreate the persistent fields in the dataset, then remove and recreate the
    fields in the datapipeline.

    It would be a lot easier to troubleshoot if ReportBuilder issued an error
    instead of an AV. AVs shouldn't happen in shipping software.

    Richard

  • edited December 2001
    Yes, if you chagne the dataset sturcture, you'll want to be sure to recreate
    the fields on the data pipelines. You should be able to toggle the
    AutoCreateFields property to recreate the fields. If this doesn't work, then
    you'll have to delete the pipeline and create a new one on the form.


    Cheers,

    Jim Bennett
    Digital Metaphors


    "Richard Biffl" wrote
  • edited December 2001
    Jim,

    Our template are stored as file.

    To print them, we make a loop between all of this template.
    We use only one instance of the Tppreport object. We call some functions to
    reinitialize all.
    Do you see some problems related to the way that we use ?



  • edited December 2001
    You should have no problem looping through the report templates in a list,
    and loading them in to a TppReport object, then calling print. What
    functions do you call to reinitialize? Are you assigning any Delphi event
    handlers for each template that you load? Can you debug what function call
    is raising the AV?

    What is different about the reports that cause the AV? Can you recreate the
    AV by only running one report in a separate test project?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001

  • edited December 2001
    OK, then there must be an event handler getting assigned for one of the
    templates that is meant for another template? Is this a possibility? Do
    you have any event handlers that are specific to one report template, and
    not others?

    You are calling Report.Reset, so are you manipulating the datasets between
    each run of the report? I'm guessing that you have queries and datapipelines
    on your form, and that you are usign thse for all reports? Try closing the
    queries before running the next report.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.