Home Server

Report Builder Server using Archive Volumes

edited October 2003 in Server
Hi,
I've ran into a problem where the database list is going way slow due to the
binary information stored.
Basically, I need to narrow down the query and not let the archive do the
searching. I've been able to retreive the URL variables from the session,
but I'm finding that most of the events don't fire on the
TrsReportArchiveVolume - I guess most of them are related to buliding the
report and in this case, it's already built.


If I try to modify the command text or pass a parameter to the query, it
gets an exception.

What I need is a more practical example about passing URL variables to a
report server from the web tier - but the report server return info from a
TrsReportArchiveVolume, not a live report. The included demos do not deal
with this set of circumstances.

My current setup works fine, it's just incredibly slow.

TIA,
Nick Hustak

Comments

  • edited October 2003

    Not sure I understand what you are trying to accomplish. Are you trying to
    use Archives or Live reports?

    An archive file contains all of the pages originally generated by a live
    report. There is no database or query.

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2003
    I'm retrieving archive files from a database BLOB field (sorry, should have
    been more clear). I'd like to only retreive the one record with the
    correct report - so I'm trying to use the GUID on the URL to accomplish
    this. I'm using the directly to a report via URL method (that I got from
    you 8) ) so I don't want the query to retrieve all the archived reports.

    Thanks!


  • edited October 2003

    Try using the ReportVolume.BeforePublishReport event. The aEventParams
    object provides access to the ReportParameters, SessionParameters, the
    ReportModule, and the Report. In the case of archives, the
    aEventParams.Report is an ArchiveReader or DBArchiveReader. You can typecast
    it.

    Have not tried to implement this, but I tested to see whether the
    BeforePublishReport event fires for the ArchiveVolume and it does.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2003
    Hrm..yes, but it fires after the pipeline opens the datasource, so that is
    no good.

    Here, let me describe what I need - maybe I am going the wrong way about it.
    Please correct any wrong assumptions I am making here.

    I have a database that has a lot of archived reports in it in SQL Server.
    On the web, the users go directly to the reports - no report browser.
    So - I have one report server with one archive component on it.
    Normally, the archive component finds the proper record from a complete
    list. This is not practical as my database is too large and retrieveing all
    those binary images is really slow.
    So - the report name in this case is a guid.

    What I need to do:
    I want to send this guid on the URL, send it to the report server, and have
    the instance query just the single record for the viewer.

    What I can't figure out:
    I am sending the URL paremters via the session variables - not sure this is
    the right way to do it. Some example code would be great.
    Before the pipeline opens, requery the table. Everytime I seem to have it
    working, I get an exception. Again, some example code would be great. The
    examples are too geared towards Access and small tables. Many of the
    assumptions don't work very well when there are 5000 records.

    Thanks for your help!

  • edited October 2003

    You should be using ReportParameters. SessionParameters should be specified
    only when the user logs on. After that they are just passed around (i..e
    ReadOnly).

    Use of Session and Report Parameters is covered in the Custom Parameters.
    Yes, these are live reports but the basic concepts are there.

    For your ArchiveVolume set DataPipeline.OpenDataSource to False. This will
    ensure that the DataPipeline cannot open your dataset. The
    ReportVolume.BeforePublishReport event is fired prior to ArchiveReader.Print
    being called - so it should enable you to apply the report parameter (i.e.
    the name) to a SQL query).

    If you would like to create a simple example using paradox to store a couple
    of archives you can send the example to support@digital-metaphors.com and I
    can try to help you with it.




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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2003
    > For your ArchiveVolume set DataPipeline.OpenDataSource to False. This will
    ArchiveReader.Print


    I'm trying to do something similar. I want to set OpenDataSource to false
    so that I can open it manually and catch any exceptions that result.
    Currently, an invalid SQL statement results in a "fatal exception".

    In OnLoadReportEnd:
    if ( TppReport( Sender ).DataPipeline <> nil ) and
    ( TppReport( Sender ).DataPipeline is TppDBPipeline ) then
    TppDBPipeline( TppReport( Sender ).DataPipeline ).OpenDataSource :=
    False;

    This works fine.

    In OnBeforePublishReport:

    if ( TppReport( aEventParams.Report ).DataPipeline <> nil ) and
    ( TppReport( aEventParams.Report ).DataPipeline is TppDBPipeline ) and
    ( TppDBPipeline( TppReport(
    aEventParams.Report ).DataPipeline ).DataSource <> nil ) and
    ( TppDBPipeline( TppReport(
    aEventParams.Report ).DataPipeline ).DataSource.DataSet <> nil ) then
    try
    TppDBPipeline( TppReport(
    aEventParams.Report ).DataPipeline ).DataSource.DataSet.Open;
    except
    on E: Exception do begin
    // catch any exceptions and re-raise an EpsReportServerError.
    raise EpsReportServerError.CreateFmt( 'Error accessing data: %s',
    [ E.Message ] );
    end;
    end;

    Error: SQL Query is empty. Apparently, the DataView hasn't been hooked up
    to the DataSet at this point. Is there any way I can do what I'm trying to
    do here?

    --
    Nathan Sutcliffe
    nsutcliffe at speedlinesolutions period com
  • edited October 2003
    Forgive me for saying this, but this is not similar. This thread is focused
    on archived reports. Your question is focused on live reports. These are two
    very very different animals. :)

    I think setting each DataView's Active property will cause the SQL to be
    generated and query to be opened.
    Try something like the code shown below. (I did not compile this).

    uses
    daDataModule;

    var
    lDataModule: TdaDataModule;

    begin

    lDataModule := daGetDataModul(myReport);

    for liIndex := 0 to lDataModule.DataViewCount-1 do
    lDataModule.DataViews[liIndex].Active := True;

    end;



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

    Best regards,

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