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 to stop report "MC RM Distribution Breakdown Register-Detail" from opening automatically?

(0) ShareShare
ReportReport
Posted on by

One of my users will have the "MC RM Distribution Breakdown Register-Detail" report window open up after closing cash batch sand it times her out of the system.  This does not happen all the time, just sometimes.  She cannot determine a pattern for when it does.


How can I find what events trigger this report, so I can stop it from automatically opening?

*This post is locked for comments

I have the same question (0)
  • Justin Thorp Profile Picture
    2,265 on at

    Hi,

    You'll get the MC version of the reports when:

    1.)  You've entered a multicurrency transaction

    2.)  In Posting Setup (Tools - Setup - Posting - Posting) you've marked the "Include Multicurrency Info" checkbox for the given Series and Origin.

    ========================================

    So depending on your requirements, you could unmark the "Include Multicurrency Info" for the Series/Origin.  Then you'll just get the Non-MC version of the reports.

    =======================

    Alternatively you could put some VBA behind the report (in the Report Start event.  Use the Report.cancel method).

    Thank you,

    Justin

  • Community Member Profile Picture
    on at

    If I put Report.cancel at the start of the report, then no one will be able to see the report.   I just want the report not to open after the cash batches are entered.  If someone is specifically looking for that report, they should be able to click it from the Reports link and view it.

  • Verified answer
    Justin Thorp Profile Picture
    2,265 on at

    You could place a little more vba to essentially prompt the user if they want the report...and then based on their answer do nothing (that is, allow the report to print), or report.cancel.  Example:

    Private Sub Report_Start()

    Dim Response As Integer

    Dim RetVal As Variant

    Response = MsgBox("Do you want to Print the MC RM Distribution Breakdown Register REPORT?", _

    vbYesNo)

    If Response = vbNo Then

       MCRMDistributionBreakdownRegis.Cancel

    End If

    End Sub

    ====================================

    The main points here are that you can only really control how that report prints via posting setup, or vba.

    I hope this helps,

    Thanks,

    Justin

  • Community Member Profile Picture
    on at

    Sounds promising. How do I modify an existing report in GP10?

  • Community Member Profile Picture
    on at

    Ok, found how to open Report Writer and modify to add the VBA with:

    dyndeveloper.com/.../reportwriter.pdf

    blogs.msdn.com/.../using-vba-with-report-writer.aspx

    Thanks for your help!

  • Community Member Profile Picture
    on at

    It happened again for my user and the Report opened up without prompting her if she wanted to view it or not, as the VBA code would indicate.

    So now back to original question of trying to determine what triggers the report to open, since it being called from GP ignores VBA code. :(

  • Community Member Profile Picture
    on at

    1) In Report Writer, I select Report and verify that MC RM Distribution Breakdown Register-Detail is listed under Modified Reports

    2) Then, Tools->Visual Basic Editor. This is the code I have in this report:

    Private Sub Report_Start()

    Dim Response As Integer

    Dim RetVal As Variant

    Response = MsgBox("Do you want to Print the MC RM Distribution Breakdown Register REPORT?", _

               vbYesNo)

    If Response = vbNo Then

      MCRMDistributionBreakdownRegis.Cancel

    End If

    End Sub

    3) Dynamics GP menu >> Tools >> Setup >> System >> Alternate/Modified Forms and Reports

    If I double click on the report name to open it, it asks me where I want to print the report and then opens the report.  It's like the VBA code is getting skipped.

  • Community Member Profile Picture
    on at

    Screenshot for step #3

  • Justin Thorp Profile Picture
    2,265 on at

    Can you debug the VBA?  I suggest putting a breakpoint on the line:

    If Response = vbNo Then

    Then step through it...1st to make sure that the Response does in fact = No, and then also to confirm that it's running the Report.Cancel bit of the code.

    Thanks,

    Justin

  • Community Member Profile Picture
    on at

    It's not bringing up a message box in order to record a response.

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
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans