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 GP (Archived)

How can I print a report using VBA?

(0) ShareShare
ReportReport
Posted on by

I would like to print a report using VBA.  I'm trying to override a button on a third party form/window.  I am able to pop up a message in the event handler using VBA.  I can't find any examples of how to print a report.  I'm aware that sanScript has a run report command but I can't find an equivalent for VBA.  I'm aware of the pass through concept but the readings I've done indicate this isn't an approach that is supported by Microsoft.

*This post is locked for comments

I have the same question (0)
  • waseem Profile Picture
    230 on at

    GP report or external report like(Crystal) ?

  • Community Member Profile Picture
    on at

    GP Report.

  • Community Member Profile Picture
    on at

    You cannot use vba to print gp reports.  Sanscript could do it, but still really tricky.  I usually build reports outside of GP (SSRS).

  • waseem Profile Picture
    230 on at

    i will also recommend to use Crystal report or SSRS. 

  • Community Member Profile Picture
    on at

    Can you provide more details around sanScript being tricky. The report already exists as a GP report and recreating it with another tool isn't an option.

  • Verified answer
    Community Member Profile Picture
    on at

    You would need a dexterity developer to create a chunk: put a sanscript trigger on the button, and the trigger will make the call to the dex report.  it would need to load whatever temp tables it needs, when making the "run report" call.  Your gp vendor should be able to hook you up with a dex developer.  SSRS developers are more plentiful than dex developers, fyi.

  • Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    may I know which GP report you are trying to call?

  • Community Member Profile Picture
    on at

    I thought this was the direction I would have to go in.  I'm a new dex developer and capable of making the changes. It just seems like a hack. As for SSRS, as I said before, it's not an option. I need to print an existing report that is part of a third party solution with a great deal of SanScript logic.

  • Community Member Profile Picture
    on at

    That should work, but if you can't get that to work, here is another idea:  put a trigger on the button, then call your own dex report.  build a sproc then feed that data into your dex report.   if you are ok with rolling your own dex code, this could work as well.

  • Community Member Profile Picture
    on at

    The customer gave the green light on the project and when I tried prototyping it I discovered that the button I want to register to is a local field.  I was able to find a public button and was able to register to that.  I'm assuming then that the fields have to be public?

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans