Passing a variable toa report
I need to pass a string to a report so that I can find some saved images to later load.
Is there an easy way to do this? Can't find anything in the manual, although I expect it is there somewhere
Is there an easy way to do this? Can't find anything in the manual, although I expect it is there somewhere
Comments
string values from outside the report need to be passed into a report variable using extra string delimiters.
[post="20271"]through Report variables[/post]
[post="27394"]through script variables[/post]
I settled on the following method using script variables as I found it straight forward and very flexible.
I use it all the time in my reports to pass 'one off variables for display.
Using script variables ( .script.variables[] insteads of just .variables[] means they do not need declaring in the report, simply refer to them by name in the memo box where you want to show them. They also need no special formatting to accept strings. see programmer manual.
In the main program, before opening the report have a line like this ( code is in Delphi)
MyValue is an ordinary string variable.
In the report, use a memo box with [MyVariableName] in it.
hsm