Failure in passing shared variable in main report to subreport select expert

StackOverflow https://stackoverflow.com/questions/23365440

  •  11-07-2023
  •  | 
  •  

문제

I need your assistant in passing a database field called {engine.rptno} to the subreport select expert from the main report. I tried to use shared variable in the main report.

I created a formula in the main report

shared numbervar report_number := {engine.rptno};

report_number; 

In the sub report, I create a formula ("Shared_report_number") and I placed it in the report header. It has the code:

shared numbervar report_number;

report_number; 

I clicked on Select Expert and then I chose the field {engine.rptno} is equal to {@Shared_report_number}, it produces and

error that : the formula cannot be used because it must be evaluated later Can you please help me in this.

도움이 되었습니까?

해결책

Instead of trying to use a shared variable, link the main report to the sub-reort on the desired field.

** edit **

Instructions:

  • Right click the sub-report and choose Change Subreport Links...
  • Select the desired field (engine.rptno) from the main report (a listbox), then click >
  • Select the desired field (engine.rptno) from the subreport (a picklist), then click OK

A record-section formula will be generated in the subreport that resembles:

{engine.rptno} = {?Pm-engine.rptno}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top