Hi Guys.
Im having a brain meltdown or something today.. im struggling with the simplest things...
Overview.
In a processing Codeunit i need to call an existing nav Processing Report.
I could copy the whole functionlaity of the report to the codeuint but that seems like a lot of un-necessary work.
So i would rather call the report but not show the dialogue box that the report calls. I dont mean the Selection or Option tabs i mean the report does a window.open.
I know what i am supposed to do but im getting an error..
I have the follwoing set up
In the report
1. A global variable of type boolean
2. Funtion to set a the Global Boolean depending upon what it is passed.
3. Code above the window.open and window.update to say, process as normal if Global Variable = FALSE
On my codeunit i delclare the report as a global variable
Call the new function and populate the boolean with my required responce.
I have done this for several codeunits and tables but today i am getting the follwoing error when i try to compile my codeuint.
A variable was expected. For example
MyVar
Customer.Name
but i am passing the variable
Code from the codeunit
SOMEREPORT.F_SkipDialogue(TRUE)
function in SOMEREPORT
F_SkipDialogue(VAR PTM_SkipDialogue : Boolean)
G_SkipDialogue := P_SkipDialogue;
Example of report window.open
If NOT G_SkipDialogue THEN
Window.OPEN(
Text000 +
Text001 +
Text002);
I know im being an idiot but i dont know what im doing wrong.
All help gladly recieved
thanks
M@
I have seen the future and it's egg shaped.
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
The error sayis i am not passing a variable but it have passed a boolean variable of TRUE
SOMEREPORT.F_SkipDialogue(TRUE)
I have seen the future and it's egg shaped.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Havign said that; for the sake of my sanity i tried to pass FALSE and still got the same error.
Is it something to do witht eh fact i am callign th efunction form a report. and normally when report.runmodal is called the expectaion of nav is for
Report.Runmodal(ReqWindow, SystemPrinter, Record);
Thinknig about ti i have only ever passed teh boolean variable to table functions and codeunits.
i would not have thought this would eb differnet for a report...
I have seen the future and it's egg shaped.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I knew it was me just being a dope! ](*,)
I have seen the future and it's egg shaped.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav