Board index » delphi » Report Smith and report variables

Report Smith and report variables

When running a Report Smith report from delphi which uses report
variables, is there any way to set the variables value from delphi and
not be prompted to enter them manualy when the report runs.

Also how can you change the printer Report Smith runtime uses from delphi
as assigning a differant printer in the printer setup dialog before the
call to report1.run has no effect.

Thanks in advance

Dave

 

Re:Report Smith and report variables


In article <[email protected]>, [email protected] says...

Quote

>When running a Report Smith report from delphi which uses report
>variables, is there any way to set the variables value from delphi and
>not be prompted to enter them manualy when the report runs.

Go into delphi help, and do a search on TReport. Look in the properties of
that component, you'll see "Initial Values" (I think)...look at the example,
it shows how to set them at runtime.

Quote
>Also how can you change the printer Report Smith runtime uses from delphi
>as assigning a differant printer in the printer setup dialog before the
>call to report1.run has no effect.

That's right. Think about it. Reportsmith runtime is a seperate executable.
you have to let the user choose "Printer Setup" from the RUNTIME program to
change. This is one of the many reasons I DROPPED reportsmoth and went to
Crystal Reports. You need less disks to redistribute it and it does a WHOLE
lot more. Looking back, Reportsmith ws very restrictive.

hope this helped

-Tekhed

Re:Report Smith and report variables


Yes - there is a way although it is not very well documented.

Report1.InitialValues.Add('@VariableName=<Variable>');

sets the initial values;

These can be changed later by

Report1.SetVariable('Variable Name', 'Variable')

There are a number of problems associated with the use of single inverted
commas which I had many happy hours fiddling with.  If you run into them
let me know and I will run through my experiences!

Other Threads