質問

I have a Sub-Report that takes 2 date parameters (Start and End date)
A Main-Report that has Sub-report nested in it. When I refresh the report, I get a prompt to enter the dates.
All I'm trying to do is display those dates in (start date - end date) format on Main-Report.

Here's what I tried.

Created a formula (SharedStartDate) in Sub-Report as

Shared StringVar startDate :=  ToText({?@start_DT},"MM/dd/yyyy");
startDate;

Created another formula in Main-Report with the same name (SharedStartDate)

Shared StringVar startDate;
startDate

When I use this formula in the main-report, I get empty text.

I'm not sure what Am i doing wrong, I'm pretty new working with CR
Thank you guys in advance for any suggestions.

役に立ちましたか?

解決

Take care of few things while passing the value to main report.

  1. Formula need to be placed on the sub report before passing the value.
  2. When value is used in main report then the resulting formula should be kept in coming sections in the design.. not in the preceeding sections then you won't get the value.
  3. one more option would be (not suggested)since you are manuplating parameters then link the parameters from mainreport to subreport and use that parameter at any section irrespective of sub report location in report.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top