Call preview report in code

gonzy1981gonzy1981 Member Posts: 156
Do you know if i can call report in mode preview??

Report206.USEREQUESTFORM(FALSE);
Report206.RUN;

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    i have written this code in a form button
    on 'on push' trigger i have written the code which u have mentioned

    but report is not opend in preview mode?
  • lyotlyot Member Posts: 202
    Searched for it a long time...
    It seems not possible, what I did is print it to html (SAVEASHTML) and showed the html file (HYPERLINK°.
  • kinekine Member Posts: 12,562
    No, there is no way how to run the report in Preview mode. You can only print it on default printer without the request form, but you cannot run it automtically into preview.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gonzy1981gonzy1981 Member Posts: 156
    Ok, thanks.
    I'll do it as SAVEASHTML.
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    If I get you correctly,
    that can be done using sendkeys.


    WshShell Automation 'Windows Script Host Object Model'.WshShell
    yourReport.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    If I get you correctly,
    that can be done using sendkeys.


    WshShell Automation 'Windows Script Host Object Model'.WshShell
    yourReport.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    

    Its working Perfect

    good work dude
  • BeliasBelias Member Posts: 2,998
    If I get you correctly,
    that can be done using sendkeys.


    WshShell Automation 'Windows Script Host Object Model'.WshShell
    yourReport.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    
    no, i don't think he can use this trick, because he doesn't show the request form ---> no preview button
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    Belias wrote:
    If I get you correctly,
    that can be done using sendkeys.


    WshShell Automation 'Windows Script Host Object Model'.WshShell
    yourReport.RUN;
    CREATE(WshShell);
    WshShell.SendKeys('%{v}');
    CLEAR(WshShell);
    
    no, i don't think he can use this trick, because he doesn't show the request form ---> no preview button



    Hi Belias, You are absolutely correct. If he sets USEREQUESTFORM = false, the trick will not work. I assumed that, he is not showing the request form only in an attempt to go directly to preview mode. So the above trick was suggested by me. :)
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
Sign In or Register to comment.