How to set focus on report's request form on OK button

HollandPolandHollandPoland Member Posts: 62
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.

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    What exactly is your requirement?
    May be we can have different approach to achieve that?
  • HollandPolandHollandPoland Member Posts: 62
    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.
  • SavatageSavatage Member Posts: 7,142
    With Report.RunModal the choices are:

    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?
  • HollandPolandHollandPoland Member Posts: 62
    Savatage wrote:
    With Report.RunModal the choices are:

    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?

    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.
  • matttraxmatttrax Member Posts: 2,309
    Theoretically it's possible with SendKeys, but I don't see the point of it.
  • CobaltSSCobaltSS Member Posts: 137
    HI all,

    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,
  • MarkHamblinMarkHamblin Member Posts: 118
    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.

    - Mark
  • CobaltSSCobaltSS Member Posts: 137
    Ah well. Thanks Mark.

    cheers,
  • sarkie83sarkie83 Member Posts: 22
    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.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    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."
Sign In or Register to comment.