About user defined variables
When i add new variable { frxReport1.Script.AddVariable('Myvar', 'String', 'MyString')},
the report bands and scripts use this variable without any incorrect operations. Morever in the previous version of the FS (3.15), this variable shows in the variables section on the report design page. But, now I use 3.20 and this varieble isn`t visible.
How can i realize visiblity of my additional variables in the variable section of the desing page?
thanks
the report bands and scripts use this variable without any incorrect operations. Morever in the previous version of the FS (3.15), this variable shows in the variables section on the report design page. But, now I use 3.20 and this varieble isn`t visible.
How can i realize visiblity of my additional variables in the variable section of the desing page?
thanks
Comments
If a variable is to be added to the specified category, use the ???AddVariable??? method:
frxReport1.Variables.AddVariable('My Category 1', 'My Variable 2', 10);
Hello,
I would like to pass a variable from the main program to the report
and I followed the following steps:
1) Create a new Variable group pressing on "FX" button in the report
toolbar
2) Added a categor "RepVars" and a variable called "monthx"
3) The OnClick procedure for the button Preview of the report is as the
following:
procedure TForm1.Button2Click(Sender: TObject);
begin
frxReport1.Variables.AddVariable('RepVars', 'monthx', 'January');
frxReport1.DesignReport;
frxReport1.ShowReport(True);
end;
But when I click on the button I get the following Error:
"Project Project1.exe raised exception class EVariantTypeCastError with message 'Could not convert variant of type (String) into type (Double)'."
Where do I set the variable type? In the code section of the report?
Thank you in advance!
neko