Board index » delphi » passing parameters to ReportSmith

passing parameters to ReportSmith

Yo All,
can someone tell me how to pass a value for a report variable from a
Delphi program to ReportSmith ?  According to the manual it should go
as follows :
    AReport.InitialValues.Add ('@varName=<someValue>');
    AReport.Run;

this should prevent ReportSmith from  displaying a dialog-box to query
for a value for the variable.  Unfortunately : this doesn't seem to
work (i.e. the darn dialog box keeps popping up).

Tnx,
Frank

 

Re:passing parameters to ReportSmith


On Fri, 03 Jan 1997 16:03:44 GMT, fran...@glo.be (Frank Van Camp)
wrote:

Quote
>Yo All,
>can someone tell me how to pass a value for a report variable from a
>Delphi program to ReportSmith ?  According to the manual it should go
>as follows :
>    AReport.InitialValues.Add ('@varName=<someValue>');
>    AReport.Run;

>this should prevent ReportSmith from  displaying a dialog-box to query
>for a value for the variable.  Unfortunately : this doesn't seem to
>work (i.e. the darn dialog box keeps popping up).

>Tnx,
>Frank

Hi Frank,

I usually do something like this:

procedure Form1.btnPreview(Sender: TObject);
begin
  iCustNoValue := edtCustNo.Text;
{ Get a Value for the Report Variable from somewhere, e.g. EditBox}
  Report1.InitialValues.Clear;
  Report1.InitialValues.Add('@iCustNo=<'''+ iCustNoValue +'''>');
  Report1.Run;
end;

In this case the name of the ReportVariable that I have set up in
ReportSmith is iCustNo.

HTH

Regina

Re:passing parameters to ReportSmith


Quote
Frank Van Camp wrote:

> Yo All,
> can someone tell me how to pass a value for a report variable from a
> Delphi program to ReportSmith ?  According to the manual it should go
> as follows :
>     AReport.InitialValues.Add ('@varName=<someValue>');
>     AReport.Run;

> this should prevent ReportSmith from  displaying a dialog-box to query
> for a value for the variable.  Unfortunately : this doesn't seem to
> work (i.e. the darn dialog box keeps popping up).

> Tnx,
> Frank

When creating the RS variable that you want to update, there are four
ways in which you can select a entry: Type-in, select from a table,
select from 2 values... When I use that method I made the variable a
typed-in value and the dialog-box did not pop-up

Other Threads