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

  • mbr Profile Picture
    5,136 on at
    RE: How to run a report and preview

    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!!!

  • Community Member Profile Picture
    on at
  • Verified answer
    mmv Profile Picture
    11,467 on at
    RE: How to run a report and preview

    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

  • Mohana Yadav Profile Picture
    60,228 Super User 2025 Season 1 on at
    RE: How to run a report and preview

    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

  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at
    RE: How to run a report and preview

    Hi

    Check the Report Properties --> PreviewMode

    Regards

    Rajasekhar.Y

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans