By using this website, you agree to our Terms of Use (click here)
In order to allow me to focus on Consulting (click here) and Courses (click here), I continue to review all posts here in the Forums, but, in general, I'm only personally responding to posts that I mark as #AcumaticaTnT (click here). For Questions (click here), others may respond, or you can post over at Community.Acumatica.com (click here).
Sincerely,
Tim Rodman
I have been using and creating global variables in sub reports, and it seems they are of type numeric by default.
In reading wiki, i have included the text
You specify a local variable for the report section. This variable is visible in all other sections of the report. If you declare the same variable in multiple sections, the variable is shared between them. If the variable is modified in one section, the new value of the variable is passed to the next section where the variable is used. The variable is initiated in the topmost section where it is used. Then the variable is sequentially modified in the following sections in the order in which these sections are printed in the report.
To define a variable, you use the Behavior > Variables property of the report section.
The variables have the VariableName}} format, where VariableName is the name of the variable defined in the report.
The following example illustrates the use of the RowNumber}} local variable in the expression.
=Assign( '$RowNumber', $RowNumber + 1 )
In a report, you can use a variable defined in a subreport. In this case, the variable has the ReportName_VariableName}} format, where ReportName is the name of the report in which the variable is defined. For example, suppose that you have defined the pmt}} variable in the payment report. If you need to use this variable in another report in your Acumatica ERP instance, you refer to this variable as $payment_pmt.
Question 1: I have been defining the same variable in each section. This doesn't seem to be required.
Question
2: Is there a definition format in that you can set a global variable to String, Boolean, date time , float, integer?
If there is no data, instead of checking <> Null I have to check for <> '0'
Looking for a more information .
thanks
Matt
1. Once you define a variable in a section, it's available in that section and the sections below that section.
2. Good question. I try to avoid variables and don't use them that much so I haven't taken notice of a "type" for variables. If you use CStr() to convert the value to a string, is it still a numeric variable? @michaelhansen loves variables and he might have more insight on this.