I am passing a variable from a subreport back to the main report.
This is working with one problem.
If the subreport has no records to report, the variable being passed back to the main report is wrong.
The variable should always report the value from the subreport for the current record.
The subreport itself prints correctly, but the variable appears to be from the previous record’s subreport value.
Best answer by BenjaminCrisman
@ltussing03 Does this report require use of variables or can the actual data fields be used instead? If it is just looking for a single value off a populated field then I think removing the variable and just using whichever field is calling in the value should work.
Otherwise you may want to check where the group is getting defined and possibly check the Process Order to see if this can make a difference.
Variables are a little challenging sometimes but if you want to share the report and subreport I can check it (providing it has data which can populate based on Sales Demo data). Otherwise it might help to also see the variable configuration and the subreport configuration
@ltussing03 Does this report require use of variables or can the actual data fields be used instead? If it is just looking for a single value off a populated field then I think removing the variable and just using whichever field is calling in the value should work.
Otherwise you may want to check where the group is getting defined and possibly check the Process Order to see if this can make a difference.
Variables are a little challenging sometimes but if you want to share the report and subreport I can check it (providing it has data which can populate based on Sales Demo data). Otherwise it might help to also see the variable configuration and the subreport configuration
Hi @ltussing03 , may I know how do you work around this issue? I am facing the same issue as yours where the sub report is out of sync when there is no record.
Erick, I am sorry. It has been a year and I don’t recall. I don’t believe I ever got the subreport to work properly but found another way to get what I needed.