New Blog Post: RESTful Reporting

how to load the criteria

edited September 2002 in End User
how to bring out the criteria section before I load the report template from
the database ( interbase) ? i need to have a senario that each report shown
in the list view and when the user select one of the report , i would enable
the user to make futher criteria condition. Is there any way to make
criteria section into my own customise form and i could pass the sql
statement to the report template before i view the report ?


  • edited September 2002
    Yes, you can load the template and then extract the SQL object. Here is a
    demo which extracts the SQL object and then creates search criteria on it on
    the fly: This demo is in RB 7 format for Delphi 6.


    Jim Bennett
    Digital Metaphors

  • edited September 2002

    is that anyway to extract more than one sql object on a report as i might
    have subreport plus another defined query , that together have one
    master-detail and independent query in a single report . how could i set the
    criteria for the master-detail and another independent query for a report ?
    i try on the example on ExtractSQLObject , it seems only extract one object


  • edited September 2002
    The TdaDatamodule has a Dataviews array property. Use this to loop through
    all of the dataviews in this report. You can search by name as shown below
    in order to get the SQL object for a particular dataview by name. I put a
    showmessage call to show the name:

    procedure TForm1.ppReport1BeforePrint(Sender: TObject);
    lDataModule: TdaDataModule;
    liIndex: Integer;
    lDataView: TdaQueryDataview;
    lDataPipeline: TppDBPipeline;
    lSQL: TdaSQL;

    {get the datamodule}
    lDataModule := daGetDataModule(ppReport1);

    if (lDataModule <> nil) then

    for liIndex := 0 to lDataModule.DataViewCount - 1 do
    lDataView := TdaQueryDataView(lDataModule.DataViews[liIndex]);

    if (lDataView <> nil) and (lDataView is TdaQueryDataView) then
    {only custom dataviews can have multiple data pipelines}
    lDataPipeline := TppDBPipeline(lDataView.DataPipelines[0]);


    lSQL := lDataview.SQL;





    Jim Bennett
    Digital Metaphors

This discussion has been closed.