web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to run a report and preview

(0) ShareShare
ReportReport
Posted on by 5,136

Hello, I created a report and want to run this report in preview mode directly on push of a button in the Page Action of my current page.  Please help on how to make this happen.  I tried looking into help file and knowledgebase but couldn't find the correct syntax.  When I turned off the request user page and the called the run method, it just printed directly to the printer.  I want to preview it.  I cant seem to find the property to set it in preview mode.  Please help.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    Check the Report Properties --> PreviewMode

    Regards

    Rajasekhar.Y

  • Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    I hope PreviewMode is available in NAV2015 not in NAV2013.

    If you are using NAV2013 then you can check this alternative

    http://www.mibuso.com/forum/viewtopic.php?f=32&t=51737&start=0

  • Verified answer
    mmv Profile Picture
    11,471 on at

    Hi,

    I don't think it's possible by setting any property.  If you really want to get it done, you may use the below code in the OnInitReport trigger of the Report (ensure that UseRequestPage is YES):-

    IF ISCLEAR(WinShell) THEN

     CREATE(WinShell,TRUE,TRUE);

    WinShell.SendKeys('%(R)');

    Where as WinShell is an Automation Variable : 'Windows Script Host Object Model'.WshShell

    It works, but I don't recommend SendKeys.

    Best Regards,

    MMV

  • Community Member Profile Picture
    on at
  • mbr Profile Picture
    5,136 on at

    Thank you MMV.  That did it! I don't like using Sendkeys either but for this case, I don't think we have a choice. :)  Thank you!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans