开发者

Pass shared variable from main report to crosstab?

开发者 https://www.devze.com 2023-02-11 05:15 出处:网络
I want to pass shared variable in main report to a subreport\'s crosstab formula field ? How do I do this ?

I want to pass shared variable in main report to a subreport's crosstab formula field ? How do I do this ?

If I declare a shared variable 开发者_开发问答inside main report and try to access it in the subreport's crosstab with 'whilereadingrecords' it just won't get anything.


I made a mock report and came up with this solution:

  • Make a formula in your main report. Enter this code:
whileprintingrecords;
shared numbervar foo:=3;
foo
  • In your subreport, make a formula. For this example, call it MySharedVar. Enter this code:

shared numbervar foo

  • In your subreport, make a second formula. Call it MySharedVar2. Enter this code:

MySharedVar

  • Use the MySharedVar2 formula in your crosstab as normal.
0

精彩评论

暂无评论...
验证码 换一张
取 消