Acumatica Report Designer how to use subreport variable in master report

1.6k Views Asked by At

In the Acumatica Report Writer, is it possible / how do you use a variable value defined and set in a subreport in the master/main report?

3

There are 3 best solutions below

1
DWS253 On

I haven't tested this myself, but the manual says,
"You can declare a variable in a subreport and use this variable in a master report. For example, you have added the $Test variable to the subreport. You added this subreport to the master report with the subReport1 element. Now you can use the $Test variable of the subreport in the master report as $subReport1_Test."

0
heather murphy On

I am sure this isn't very helpful now, but the variable name doesn't include the subreport's name. It is the name of the element in the master report. So the sub report may actually be called ExampleReport.rpx, but to get the variable to show you need to use $subReport1_variableName. If you had a second subreport it would be $subReport2_variableName. Hope it helps the next person who stumbles into this. :)

0
TheGrinder On

Make sure you convert it to the right variable type if string is not what you are passing from for example my issue was with decimals and not having added CDec($subReport2_variableName) returned the error Acumatica cannot find the referenced variable.