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

Error reading Soci.OnTraversal: Invalid property value

edited June 2005 in General
Hi I'm getting the error message about but what I can't work out is why I
get the error in one section of my program and in another I don't.
I get the error when I call

ppExplorer.PrintPreview(qryReports.FieldByName('NAME').AsString,qryReports.FieldByName('FOLDER_ID').AsInteger);

Any ideas? Thanks
Steve

Comments

  • edited June 2005
    I've also found that its only on some reports I get the error? Any ideas?
    I'm confused that it only happens on some reports, but else where it doesn't
    error.

  • edited June 2005
    Hi Steve,

    What is the error that you are getting? If you trace to the line of code
    below, are the NAME and FOLDER_ID fields actually sending values to the
    PrintPreview routine?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    There are name and folderid values going into the PrintPreview command.
    If I hit F7 to step on from the break point, I can't it just gives an error.
    (we are on V6 Enterprise incase that helps)
    Steve

  • edited June 2005
    I've also tried ppExplorer.Open and ppExplorer.LoadReport all options give
    the same error.
    Steve

  • edited June 2005
    The only thing I've managed to find is that the event
    ppDesignerReportSelected is being hit twice after the Print / load command.
    I set each OnEvent to try and find where it was getting too. (By that I mean
    each event had the following code)
    begin
    Sleep(1) ;
    end;
    HTH. Steve


  • edited June 2005
    Hi Steve,

    1. What is the exact version of ReportBuilder you are using?

    2. Are you loading templates that are expecting to be connected to a
    certain datapipeline? If so, this could be your problem. Does the Soci
    pipeline exist in your application?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Version 6 - Enterprise

    I have the demo forms "formReportExplorer" in my project In one place I'm
    creating this and it works,
    In another section of the code I create this form into a TabSheet as part of
    a modal dialog form so they can quickly access some reports.
    Its at this location that the same action from formReportExplorer doesn't
    work (where it did in the other location).

    Why would I get this from the same section of code?


  • edited June 2005
    Hi Steve,

    I'm still a bit unclear. Where is the Soci pipeline located? Where and
    what are you using the OnTraversal event for? The fact that you are getting
    this error implies that you are loading a template that has implemented
    this event on the Soci pipeline but that code or event is no longer
    available or cannot be found.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Hi Nico,

    As far as I'm aware I'm not using the OnTraversal Event. How can I double
    check this?
    There are no events on the components selected.

    I've walked the code in as far as I can to try and work out whats going on.

    There is a procedure....

    procedure TppTemplate.LoadFindMethod(Reader: TReader; const MethodName:
    string; var Address: Pointer; var Error: Boolean);

    At some point this reports and error. Just for the hell of it I told it to
    stop thinking there was an error and it all worked.
    Any ideas?

    Steve



  • edited June 2005
    Just incase it helps, the method is being called from (where it originally
    errored)

    procedure TppTemplate.LoadFromStream(aStream: TStream);
    .....
    lReader.ReadComponents(FRoot, nil, LoadCallback);
    .....

  • edited June 2005

    When a report is saved, the names of the event-handler methods that you
    assigned to the various report elements are saved as part of the report
    definition. When the report loaded the name references are resolved into
    method pointer references.

    The event-handler methods need to published methods of the form/datamodule
    upon which the report resides.





    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2005
    In otherwards, I can't have two ppReportExplorers in my program that I run
    from different places?
    The two I have point back to the same datamodule, but sit on two different
    forms. Only one form is created at any one time in the program.


This discussion has been closed.