Passing a Boolean to a report

MatStephensSandAMatStephensSandA Member Posts: 74
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.

Comments

Sign In or Register to comment.