cancel
Showing results for 
Search instead for 
Did you mean: 

transfer shared variable betweent main report and subrport

Former Member
0 Kudos

I have a main report which includes two subreports.If I want to transfer a variable between two subreports, how should I do? It didn't work if I used the following way:

First, I set a shared variable in one subreport:

shared datetimevar date:="database field";

Second, set a shared variable in the main subreport:

shared datetimevar date;

date;

use a parameter to retrieve this variable.

Finally, link this parameter to another subreport.

Position: one subreport is put into Details A, another subreport is put into Details C, a parameter which retrieves the value from subreport is in Details B,and the order is A,B and C.

When the value of shared variable from the subreport changed as database field turns down, it worked well. But strange things happpened when the value was null after several not null values.The subreport exporting data could show the value correctly whether or not the field was null,but main report could not retrieve correct values from subreport.For example, when the shared variable from subreport is not null and changes one by one, the parameter does the same way. When the shared variable is null after not null values, the parameter still shows the last not null value from subreport unless the shared variable is changed.

The point is that the value of parameter can refresh with the shared variable of subreport.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Search Forums, this has been answered