Hi all! I've Nav 2009 R2, how to set focus on report's request form on OK button? Is it possible? The report is called by REPORT.RUNMODAL function. Thanks a lot for the replies.
What exactly is your requirement?
May be we can have different approach to achieve that?
When I click a button on a form, it has to open a request form of the report and the focus is on the OK button (of the request form of the report). That's all.
Without a request window
REPORT.RUNMODAL(1001, FALSE);
Without a request window and to the system printer
REPORT.RUNMODAL(1001, FALSE, TRUE);
Without a request window and to the printer selected through the Printer Selection table
REPORT.RUNMODAL(1001, FALSE, FALSE);
Do you just want this report to run?
Di you want to see the request form of the report?
Yes, this is the way I know, but my customer wants to see the request form, but he wants only to click Enter to execute the report. Is it possible? If not I will tell him that it's no possible and he will run it without request form.
I have a similar request. The Request form is interactive, the user uses a scanner to read a barcode of an order they want printed. The user then just wants to hit the <Enter> key to start the report. But the OK button doesn't have the focus. NextControl property on the Order No. field can't be used, as far as I know, because the OK button doesn't exist. I ensured the scanner was programmed to add the <Enter> key after scan (and then I tried the <Tab> key) but that doesn't work. The keyboard shortcut to get to the OK button is <CTRL> + <down arrow>, but I can't program the scanner to do that.
We're using the 2009 front end with a 3.7 backend, if that makes any difference.
If you're in RTC, the hotkey to activate the OK button is Ctrl+Enter. If you're in classic, you can still use the keyboard, but you have to hit Ctrl+DnArrow to get to the OK button, then press Enter.
There is no practical way to programmatically focus the OK button from within NAV.
I know in the classic client you can set the ActiveControlOnOpen value to the ID of the control (In your case the OK button) on the form itself.
It just means that however that form is opened, that control will be the default one. Rather than different behaviour if called in a certain way if that is what you were after.
I think they are talking about a report rather then a form.
In CC the focus is saved in zup file if Property SaveControlInfo is Yes (default) on the Request Form. So, you need to set the focus manually once for the first time. But if you first want to enter or scan something into another field then you have to use the shortcuts mentioned (if you don't want to use your mouse).
"Money is likewise the greatest chance and the greatest scourge of mankind."
Comments
May be we can have different approach to achieve that?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
When I click a button on a form, it has to open a request form of the report and the focus is on the OK button (of the request form of the report). That's all.
With a request window
REPORT.RUNMODAL(1001);
Without a request window
REPORT.RUNMODAL(1001, FALSE);
Without a request window and to the system printer
REPORT.RUNMODAL(1001, FALSE, TRUE);
Without a request window and to the printer selected through the Printer Selection table
REPORT.RUNMODAL(1001, FALSE, FALSE);
Do you just want this report to run?
Di you want to see the request form of the report?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Yes, this is the way I know, but my customer wants to see the request form, but he wants only to click Enter to execute the report. Is it possible? If not I will tell him that it's no possible and he will run it without request form.
I have a similar request. The Request form is interactive, the user uses a scanner to read a barcode of an order they want printed. The user then just wants to hit the <Enter> key to start the report. But the OK button doesn't have the focus. NextControl property on the Order No. field can't be used, as far as I know, because the OK button doesn't exist. I ensured the scanner was programmed to add the <Enter> key after scan (and then I tried the <Tab> key) but that doesn't work. The keyboard shortcut to get to the OK button is <CTRL> + <down arrow>, but I can't program the scanner to do that.
We're using the 2009 front end with a 3.7 backend, if that makes any difference.
Any advice greatly appreciated.
cheers,
There is no practical way to programmatically focus the OK button from within NAV.
- Mark
cheers,
It just means that however that form is opened, that control will be the default one. Rather than different behaviour if called in a certain way if that is what you were after.
In CC the focus is saved in zup file if Property SaveControlInfo is Yes (default) on the Request Form. So, you need to set the focus manually once for the first time. But if you first want to enter or scan something into another field then you have to use the shortcuts mentioned (if you don't want to use your mouse).