Is it possible to tell if a report is being called from a form or from the object designer? I want to fire some functionality if the user is running the report from a button on the form, but not if I am running it from the designer. I'm hoping to make the change to the report because this isn't a form we can easily modify so I am looking for a way to determine it in the report.
0
Comments
But if you will change the form, and will call the report through variable, you can pass some flag through functions etc. See How To pass data into report...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Then in the form you set the global variable, in the report you test for it and then delete the global variable. This last in case you would then run the report from the object designer. If you didn't delete the global variable, it would still be there.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Before you call it from a button, call the function and set the global variable.
//call in code
rReport.SetParameters(true);
rReport.runmodal;
//in report
function SetParameters(_fromForm: boolean)
GlobalCalledFromForm := _fromForm
OnPreReport
if GlobalCalledFromForm then begin
//do whatever
end;
-a
That's right!
But in this case: How can I suppress the upcoming filterdialog?
(As I would do it in RUNMODAL(....))
...sorry for activating this one year too late!
Thanks for your help!
Dirk
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!