2.. Process to Dynamically hide/display fields in Report request page
As Discussed in earlier Post. We can achieve request page Fields using / Setting Visibility of respective fields . So in this post i would use a INPUT BOX.
Below is example from Saurav Dhyani sir, i used it in my case.
How we used to use it in NAV 2009 Classic or Before -
Below is the code that we used to write for using InputBox to accepts inputs from User. In this case i will store the results in CustomerNo Variable as shown.
Here is what we have when i tried to run this codeunit.
Let's Move this codeunit to NAV 2013 R2 and try to Run the Same.
It did compiled as shown below -
But Let's see what happens when i tried to run the same. Oh this ends up with an error message saying - "The Input Method is Obsolete".
How we can use it in NAV 2013 and Later?
DOTNET have the Same Funtion with a minor Change which can be used as Input Box.
I will Change the Paramter as Below -
--------------------OLD----------------
Name = Window
DataType = Dialog
SubType = ''
--------------------OLD----------------
--------------------NEW-----------------
Name = Window
DataType = DOTNET
SubType = Microsoft.VisualBasic.Interaction.'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
------------------NEW--------------------
* Make Sure You change the Property RunOnClient = TRUE for the Variable Window,
coming to our example we need a boolean variable to to set the fields Visibility , So i Prompted window to select true/ false . Like Below...
Then Set that Bool value , BUT the thing is that we should add code in onOpen page ()Trigger
One more thing is that we should/can only write above code in ONINIT() or OnopenPAge
because these are only area that i hav seen effect after that page is already instantiated so there would be no effect.
The Flaw in this process is that once you got request page there is no use of boolean variable as if you change it to false i mean uncheck BOX there would be no use ...
So go for 1st Process , if you need you can use 2 nd process
Thank you ...........
Showing posts with label Dynamic windows. Show all posts
Showing posts with label Dynamic windows. Show all posts
Thursday, December 17, 2015
Dynamically hide/display fields in Report request page - NAV 2013 OR NEWER Part I
As EveryOne know for getting Dynamically hide /Display fields in Request Page of report we need
1. Boolean Variable
(And Field that we want dynamically let it be of TEXT variable for this Example .) like below
I need to implement like when i click boolean button to true (check box) then only a text field should appear like below.
so We have declare the two variables as shown in first pic and don't forget to set their properties to
INCLUDE to DATASET to YES.....
Now SET the Visibility of Text variable to Boolean Variable . Like Below ...
Yes , you wont get any result i mean dynamic fields as this above process has got result for 2009 NAV ..I'm NOT the Big Guy to discuss about why?
So there are two process for achieving it
1..Make a Group and set the group Visibility property to Boolean variable as Below
Now Save THE REPORT AND RUN IT WORKS LIKE A CHARM..
In the Next post i will use a Dotnet variable to get Boolean so NO group visibility......
Plz comment OR like it
Thank you ,
1. Boolean Variable
(And Field that we want dynamically let it be of TEXT variable for this Example .) like below
I need to implement like when i click boolean button to true (check box) then only a text field should appear like below.
THEN BOOM
INCLUDE to DATASET to YES.....
Now SET the Visibility of Text variable to Boolean Variable . Like Below ...
Now Save the report and Run......................................................................................
So there are two process for achieving it
1..Make a Group and set the group Visibility property to Boolean variable as Below
Now Save THE REPORT AND RUN IT WORKS LIKE A CHARM..
Plz comment OR like it
Thank you ,
Subscribe to:
Posts (Atom)







