开发者

Pass shared variable from main report to crosstab?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜