How to return to report options from Print Preview mode?

jaustinjaustin Member Posts: 21
When I run a report and choose the Preview option, the requested report appears on the screen. When I 'ESC' out or Close the window, the entire report is closed.

My question is... is there a way to return to the selection/option tabs (so the preview can be run again) instead of having the report close, where I then have to reopen the report to get back to the selection/option tabs?

Thanks,

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    No. Not really.
    Maybe you could check in the report if it was shown as preview (CurrReport.PREVIEW) and then start the report again when you return to place you were when you started the report... :-k

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • sendohsendoh Member Posts: 207
    hi jaustin,

    may be you can use send keys.

    variable: vsendkeys (automation)
    'Windows Script Host Object Model'.WshShell

    for a quick view try to paste this code in request form->Oncloseform in report 111 (Customer - top 10 list)

    Customer - OnCloseForm()
    IF ISCLEAR(vsendkeys) THEN
      CREATE(vsendkeys);
    
    IF CurrReport.PREVIEW THEN
      vsendkeys.SendKeys('%r');
    


    regards,

    Sendoh :idea:
    Sendoh
    be smart before being a clever.
  • sendohsendoh Member Posts: 207
    i forgot this to direct you in option tab
    vsendkeys.SendKeys('^{pgdn}');
    
    :sick:
    Sendoh
    be smart before being a clever.
  • NaviDevNaviDev Member Posts: 365
    sendoh wrote:
    hi jaustin,

    may be you can use send keys.

    variable: vsendkeys (automation)
    'Windows Script Host Object Model'.WshShell

    for a quick view try to paste this code in request form->Oncloseform in report 111 (Customer - top 10 list)

    Customer - OnCloseForm()
    IF ISCLEAR(vsendkeys) THEN
      CREATE(vsendkeys);
    
    IF CurrReport.PREVIEW THEN
      vsendkeys.SendKeys('%r');
    


    i forgot this to direct you in option tab
    vsendkeys.SendKeys('^{pgdn}');
    
    :sick:

    This works when you run the report using the Object Designer, but not in the Navigation Pane.
    Navision noob....
  • sendohsendoh Member Posts: 207
    this will work with navigation pane..

    IF CurrReport.PREVIEW THEN BEGIN
       
      vsendkeys.SendKeys('{F12}');
      vsendkeys.SendKeys('{Enter}');
      vsendkeys.SendKeys('^{pgdn}');
    
    END;
    
    :whistle:
    Sendoh
    be smart before being a clever.
  • NaviDevNaviDev Member Posts: 365
    sendoh wrote:
    this will work with navigation pane..

    IF CurrReport.PREVIEW THEN BEGIN
       
      vsendkeys.SendKeys('{F12}');
      vsendkeys.SendKeys('{Enter}');
      vsendkeys.SendKeys('^{pgdn}');
    
    END;
    
    :whistle:

    This will work if you are only working with the report. What if you run the report then preview, run another object. Click window select the report with sendkeys you have modified, then press ESC, notice that the open object is the second object you have run not the report. :whistle:
    Navision noob....
  • sendohsendoh Member Posts: 207
    ofcourse i'll make a code for that... it depends on the requirements.. :D
    Sendoh
    be smart before being a clever.
  • NaviDevNaviDev Member Posts: 365
    sendoh wrote:
    ofcourse i'll make a code for that... it depends on the requirements.. :D

    My answers to you is not to question your knowledge on coding. I am just foreseeing the scenario in a user views.
    Navision noob....
Sign In or Register to comment.