Report Smith

  1. Passing a report variable to ReportSmith

Passing a report variable to ReportSmith

M Richens <max@richens.demon.co.uk>

 "Matthew M. Boron" <tomcat@tusco.net> writes
>I am having trouble passing a customer id to reportsmith to print a
>specific master/detail report.  I keep getting prompted by reportsmith to
>enter the id for the report variable.
>
>Is there a way to pass this variable from Delphi into ReportSmith
This caused me a lot of grief to start with but example


 
begin
    MillCardNewRep.InitialValues.Clear;
    {Send the Current Milling Number either just
     finished or the last one to ReportSmith}
    MillCardNewRep.InitialValues.Add('@MILLING=<'+MillingNoEdit.Text+'>')                       
     MillCardNewRep.Run;
 end;

I declared a report variable MILLING in RS report as a number which is entered from a box

BUT

notice that you MUST send the value from Delphi as the .Text not as a Value. If needed convert it to str (or PChar??) but I just read it from an edit box which was readonly as I used an AutoIncrement field.


Please email me and tell me if you liked this page.