Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Call a custom SSRS report through Print button in GP

Posted on by 3,208

I need to call a custom SSRS report on click event of a print button in GP, (and also send parameters if possible). How can we do that?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Call a custom SSRS report through Print button in GP

    Hello.

    I am launching this report directly from a button on the Sales Transaction Entry window.  The report launches but the parameter is not passed in and the report does not execute.

    Can someone reply with the block of code where they were successfully able to accomplish this?  Thanks again.

    Private Sub PushButtonM233_Changed()
        Dim objExplorer
               
        Set objExplorer = CreateObject("InternetExplorer.Application")
        objExplorer.Navigate "uksql3.intl.lcl/.../Report.aspx;rs:Command=Render&Customers=00001 "
        objExplorer.Visible = 1
    End Sub

  • Verified answer
    Zain Bokhari Profile Picture
    Zain Bokhari 3,208 on at
    RE: Call a custom SSRS report through Print button in GP

    Thank you (Victoria and Tim) for your responses.

    I would definitely consider it if we ever have multiple custom reports.

    Thank you Tim, your solution gave me an idea which resolved my issue.

    The solution we needed was just for one single scenario and the purpose was just to display some additional calculated information from the data.

    So we just used the win form-report viewer instead of IE window to run the report.

    It also allowed me to pass the parameters.

  • Suggested answer
    Tim Foster Profile Picture
    Tim Foster 8,515 on at
    RE: Call a custom SSRS report through Print button in GP

    Victoria's answer is the best way to accomplish what you want.

    I have used VBA to run a custom report rather than a report writer report.

    The problems with doing this are many and in certain cases you could damage data (think Posting Reports when you Cancel the Report Writer report).

    In VBA, you prepare an Internet Explorer window (you need to include a reference in your project), build the URL with or without parameters,  submit the URL to the IE window and show the IE window.

    Tim

  • Suggested answer
    Victoria Yudin Profile Picture
    Victoria Yudin 22,766 on at
    RE: Call a custom SSRS report through Print button in GP

    Hi Zain,

    We have an add-on product for Dynamics GP called GP Reports Viewer that will do exactly this. Here is more information on it:

    www.gpreportsviewer.com/GP-Reports-Viewer

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans