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

rsClientReport and passing static info

edited September 2002 in Server
I have 3 variables that contain header / report title information on a
rsClientReport. In the RAP OnPrint of each variable I equated some default
text to each variable that displays when the report is run from either the
RB Explorer or the WEB Tier. (This is working very well)

However, I would like to update the default text in each variable to
something else when calling the same rsClientReport from a Delphi.exe.


I saw the Tech Tip "LoopThrough All Objects in a Report" and it's not
working for me - run tiime errors - in the onBeforePrint for the report. I
also saw someone using a temporary table to pass this info which should work
but isn't there something easier?


Any ideas? What's the best way to pass static info into an rsClientReport
variable.text or label.caption?

Thanks in advance - Jon Gray

Comments

  • edited September 2002

    The report is executing on the server - that is where the
    TppReport.Bands[].Objects[] reside and that is where any event-handlers
    associated with the report reside.

    The ClientReport receives TppPage objects from the server.

    Server (Report) ---> TppPage --> ClientReport --> TppPage --> TppDevice
    (Viewer, Printer etc.)

    There might be other ways to do this that I think of later, but here is
    one thought:

    Use a file or database to write the params from the client application.
    Then have report executing on the server read from the file or database.

    b. One way to do this is to use a DataPipeline (DBPipeline, JITPipeline,
    or TextPipeline) depending on the storage. The pipeline could contain a
    single record that has the param values. Then use TppDBText to print the
    values on the report.

    a. Another way to do this would be to create a report event-handler use
    the the form/datamodule OnCreate event to read the params.








    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2002

    a. Another way to do this would be to create a report event-handler use
    the the form/datamodule OnCreate event to read the params.
    <<

    I'm think this is what I'm doing now for onReceiveAutoSearchFields and
    onPreviewFormCreate events when called from my client.exe. The report
    executes on the server and makes a call back to my client events because I
    override them from the client exe. Works great. I can adjust the preview
    window and stuff in autosearch values into the server based report.

    I tried this same technique for the Report.Oncreate and the code will
    execute on the client but I can't gain access to the variable.text already
    sitting on the report. Perhaps this is a timing issue and I need to call
    this later in the report process? OnPagePrint or variable.OnPrint? Or am
    I just dreaming here because there is no way to get the report into scope
    from the client?

    I'm so close to having RB 7 server working with the Explorer, Web Tier and
    client.exe, this is the last hurdle...!


    Jon Gray
  • edited September 2002

    Sorry if my prior post was not clear.

    The ClientReport can issue requests to the server to execute a report.
    It does this implicitly when you call Report.Print. If the report
    requires autosearch values, then the server sends the AutoSearch field
    objects to the ClientReport. The ClientReport then creates the search
    dialog, displays the dialog and finally sends a second print request to
    the server. This second print request contains the autosearch values.
    The server generates the requested page(s) and sends the page(s) to the
    client.

    Thus, the ClientReport receives AutoSearchFields and Page objects from
    the server. But that is all. The ClientReport does not have access to
    the report definition.

    An event such as OnPreviewFormCreate works because the preview form is
    created on the client side.

    In 'a' below when I said report event-handlers I was referring to the
    TppReport object residing on the server.

    Hope this clarifies things.





    Best regards,

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