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

Advantage Database and End-User reporting

edited June 2004 in End User
I'm working on an end-user reporting solution using Advantage database
and am having some problems.

Everything works perfectly until I encrypt the tables. So far, only the
one main table that reports are generated from is encrypted. When I go
to run the app, it fails in ppDBPipe.pas at the fDataLink.DataSet.Open
line in the procedure TppDBPipeline.OpenDataSet.

I know why it's failing. I need to supply the table's password before
it is opened by the above call. I could do this in the OnBeforeOpen
event, but I hate to modify ppDBPipe.pas to do this. Is there a way
that I can define my own OnBeforeOpen event in my app and assign it to
fDataLink.DataSet's event?

I hope that was clear. Thanks!

rob

Comments

  • edited June 2004

    A couple of options I can think of:

    1. Modify the DADE plug-in for Advantage, daADS.pas and put the code in
    there.

    2. Use the Report.Template.OnLoadEnd event to attached the DataSet event
    handler. You can use the report's TdaDataModule to traverse the
    DataModule.DataViews[].DataPipelines[] structure.

    uses
    daDataModule;

    var
    lDataModule: TdaDataModule;

    begin
    lDataModule := daGetDataModule(myReport);

    for liDataView := 0 to lDataModule.DataViewCount-1 do
    begin
    lDataView := lDataModule.DataViews[liDataView];
    for liDataPipeline := 0 to lDataView.DataPipelineCount-1do
    {now get the datapipeline, typecase as DBPipeline and gain
    access to the DataSet}
    end;

    end;



    --

    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/


    Best regards,

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