Connection DB

😥I added the DBX and DBXTable objects in a report.

From Delphi I can not find the property to pass data to the DBX connection ..

How can I do ?


from delphi I have a variable that passes to the report with the path of the database but how can I associate it with the dbx component

Comments

  • You can access to TfrxDBXDatabase.Params (this is TStrings) from Delphi

    TfrxDBXDatabase(frxReport1.FindObject('DBXDatabase1')).Params.Strings[n] := 'YourNewValue';

  • perfect.. function.

  • except I created a report where inside I set the DBX components.
    I can't set the connection parameters from delphi.
    below what i pass from delphi. if I can I also attach postpones
    

     fxREP.LoadFromFile(ExtractFilePath(Forms.Application.ExeName) + 'REP\FX\FATTURA' + '.fr3');

     TfrxDBXDatabase(fxREP.FindObject('DBX')).Params.Strings[1] := 'Database ='+ DBC_INFO('CONFIG','DATABASE');

     fxREP.Variables.Variables['REGNUM']  := #39+Trim(IntToStr(cdArt.FieldByName('REGNUM').AsInteger))+#39;

     fxREP.PrintOptions.ShowDialog := False;

     fxREP.ShowReport;

  • in the report have: onbeforeprint:

    qbMVH.CLOSE;

    qbMVH.params('REGNUM').Value:= <REGNUM>

    qbMVH.OPEN;


    want dbxconnections.ini

  • risolto con i componenti IBX e anzicchè DBX

  • Yes, IBX is much easy to configure

Leave a Comment