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

Manually activating data views

edited October 2003 in Server
> Forgive me for saying this, but this is not similar. This thread is
focused
two

OK, OK, I'll start a new thread! :-)

I tried your suggestion and it didn't work. The line DataView.Active := True
didn't produce an error, but when RB tried to generate the report, I got:

EPrintError 'Cannot generate report. Could not open DataSet.: BogusQuery'

I even tried this:

DataView.Active := True;
for PLIndex := 0 to DataView.DataPipelineCount - 1 do
DataView.DataPipelines[ PLIndex ].Open;

I really need to be able to catch these exceptions and not have them kill
ReportServer!

--
Nathan Sutcliffe
nsutcliffe at speedlinesolutions period com

Comments

  • edited October 2003

    I successfully tested this by modifying the
    RBServer\Demos\Servers\VolumeTypes\Reports in Files as shown below. I traced
    the source code and the SQL was assigned to the TQuery object and the
    pipelines were opened. (You need to use the default of
    DataPipeline.OpenDataSource = True. ).


    procedure
    TdmReportTemplateVolume.rsReportTemplateVolume1LoadReportEnd(Sender:
    TObject);
    var
    lDataModule: TdaDataModule;
    lReport: TppReport;
    liIndex: Integer;

    begin
    lReport := TppReport(Sender);

    lDataModule := daGetDataModule(lReport);

    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
  • edited October 2003
    > I successfully tested this by modifying the
    traced

    Aha! That works! Thanks. I don't know why, but I had it stuck in my head
    that I needed to have DataPipeline.OpenDataSource = False. I didn't try
    this combination.

    --
    Nathan Sutcliffe
    nsutcliffe at speedlinesolutions period com
This discussion has been closed.