Home Server

acces sql query from rboraclereportserver

edited October 2005 in Server
Hi,

how can ik acces the text lines of the sql in a loaded report from
rboraclereportserver.

I often did this on normal reportbuilder with a slight change in dadoa by
calling my own function from TdaDOAQueryDataView.SQLChanged.

I cant use the "autosearchfields to sql where clause example". I dont have
the query on my form. Its created in the report datapipeline.

I somehow have to acces it thru the report datapipeline etc.

Any Tips?

thanx in advance

Ruud

Comments

  • edited October 2005

    1. One option would be to use the same approach - modify the
    TdaDOAQueryDataView.SQLChanged method.

    2. Another option is to use the TdaSQLBuilder class to modify the TdaSQL
    object. The TdaSQLBuilder class can be used from RAP code. Use the
    Report.BeforeOpenDataPipelines event. Here is an example of using
    TdaSQLBuilder to apply autosearch values to a second query.

    http://www.digital-metaphors.com/tips/SQLBuilder_AutoSearchTo2ndQuery.zip



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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2005
    My problem was how to get hold of the sql.line in the server environment.

    I fixed it using the first aproach.
    on datamodule1 i made a public property.

    in BeforePublishReport of rsReportExplorerVolume i fill the value of that
    property.

    in unit dadoa, function sqlchanged i use stringreplace in a loop to change
    some keywords in the sql

    for i := 0 to FQuery.SQL.Count-1 do
    begin
    FQuery.SQL[i]:= StringReplace(FQuery.SQL[i],'[**replace this**]',
    TDatamodule1(FQuery.Owner.owner).onderdeeluniek,[]);
    end;

    works great.

This discussion has been closed.