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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

VBA Code Not Running Behind Report

(0) ShareShare
ReportReport
Posted on by 215

Hello,

I have a modified report (SOP Blank Options Invoice Form) in Report Writer that prints as the modified version when 'standard' is selected in the 'Printing Destination' window, and I have converted it into a word template that also prints when 'template' is selected in the same window.

The issue I am having is that I have added the report to VBA from within Report Writer and added several fields from Report Writer to VBA in the same manner, however, my VBA code does not run when the report is generated. This is the first time I have ever experienced this issue and I had set debugging markers at the first function call (the code cannot end prior to this point), however it does not run at all. All security should be set correctly, or else I would not see the modified report print at all. I have tried removing the VBA and the modified report completely, then re-importing the report separately and adding to/and VBA afterwards to ensure it wasn't just buggy the first time around.

This report is printed from the 'Sales Transaction Entry' window when 'Include Tax Details' is selected, and I was able to verify that my code for the plain SOP Blank Invoice Form will run when printed.

Any idea? This is driving me nuts and I would greatly appreciate any help that could be provided.

Thank you!

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: VBA Code Not Running Behind Report

    Did you ever figure this out ?

  • Derek Albaugh Profile Picture
    on at
    RE: VBA Code Not Running Behind Report

    Not sure you'll get a response being this is 5 years old, but based on what was mentioned in this forum, I just wanted to mention a couple things:

    >>First, selecting 'Standard' or 'Template' doesn't impact whether you're going to get the default or modified version of the report, that is specified in the Alternate/Modified Forms & Reports window.

       If I select the modified version of the report, when I run it, even though I may choose the 'Standard', I'm still going to see the modified version of that report, as that is what security is setup to give me.

    >>The Standard and Templates option is only to specify whether you want to use a Word template you have selected for that report, or you want to use the regular report, again whether you get the default report or modified report will depend on the security setting.

       The template being used for that report will be specified in another window for the Templates.

    Hopefully this will give you some guidance, otherwise, let us know what you're running into and we can go from there.

    Thanks

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans