I'm still new in Navision, how can I restrict a variable in request page that if the variable is empty the report will not load. instead it will show a message that the "Vendor No." is required. (see attached photo)
Please check some standard reports related to start date and end date.
You need to write code in OnPreReport to check whether vendor no. has a value. if not show an error
Or from the RequestPage the OnQueryClosePage(CloseAction : Action None) : Boolean trigger. You could EXIT(FALSE) when the value is empty preventing starting the report at all.
Ok, as Mohana and duikmaster stated already:
OnQueryClosePage(CloseAction : Action None) : Boolean
IF YourVariable = '' THEN
ERROR("someError")
Of course your RequestPage Variable has to be global for this to work.
You can place the same trigger in the Reports OnPreReport for the same effect (is propably better, because nobody likes code in RequestPages)
Please check some standard reports related to start date and end date.
You need to write code in OnPreReport to check whether vendor no. has a value. if not show an error
Or from the RequestPage the OnQueryClosePage(CloseAction : Action None) : Boolean trigger. You could EXIT(FALSE) when the value is empty preventing starting the report at all.
for example. I have this variable that I use for request page. then if the user click the preview button without entering any value in that variable then the system will pop up a message that it needs to have a value then the report will not load it will stay in the request page
Can I ask question. how can I stop a preloading Report ?
What exactly do you mean by that ?
for example. I have this variable that I use for request page. then if the user click the preview button without entering any value in that variable then the system will pop up a message that it needs to have a value then the report will not load it will stay in the request page
Ok, as Mohana and duikmaster stated already:
OnQueryClosePage(CloseAction : Action None) : Boolean
IF YourVariable = '' THEN
ERROR("someError")
Of course your RequestPage Variable has to be global for this to work.
You can place the same trigger in the Reports OnPreReport for the same effect (is propably better, because nobody likes code in RequestPages)
Answers
You need to write code in OnPreReport to check whether vendor no. has a value. if not show an error
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
What exactly do you mean by that ?
for example. I have this variable that I use for request page. then if the user click the preview button without entering any value in that variable then the system will pop up a message that it needs to have a value then the report will not load it will stay in the request page
OnQueryClosePage(CloseAction : Action None) : Boolean
IF YourVariable = '' THEN
ERROR("someError")
Of course your RequestPage Variable has to be global for this to work.
You can place the same trigger in the Reports OnPreReport for the same effect (is propably better, because nobody likes code in RequestPages)