Options

Calling a report from another - Setting variables

Hi

I'm calling a report from another. The report I'm calling has a request form, wich I set as unable in the RUN command. But I need to set some variables to filter a table, etc.

Lets say report A calls report B.

In report B, I set a variable X in C/AL Globals. Then, I define a function InitX(value) wich does:
InitX( Value : Text[30])
X:= Value;

I use the InitX function from my report A:
txtFilter := '010119..310119';
R50042.InitX(txtFilter);
// And I see X with his proper value
REPORT.RUN(50042,FALSE,FALSE);

Then, in my table's event OnPreDataItem I want to filter it using X:
"Cust. Ledger Entry".SETFILTER("Posting Date",X);

And X is empty :(

How can I set a variable from the outside, and use it later in the report?

Thanks


Best Answers

Answers

  • Options
    EvaEEvaE Member Posts: 4
    Thank you so much, AK. It worked beautifully :)

    Now, even if I set USEREQUESTFORM to false, I have to push "Accept" button when running my form. I want it to run in a NAS proccess, and need it to be autonomous. How can I avoid this behavior?

    Thanks
  • Options
    EvaEEvaE Member Posts: 4
    Thanks Wolfskin :)
Sign In or Register to comment.