Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to use Customization Manager to add a button that prints a report in Microsoft Dynamics SL


View products that this article applies to.

INTRODUCTION

Thai article describes how to use Customization Manager to add a button that prints a report in Microsoft Dynamics SL

↑ Back to the top


More Information

Note To follow the instructions in this article, you must have Customization Manager in Microsoft Dynamics SL registered.

The following steps print a list from the Voucher and Adjustment Entry (03.010.00) screen. The list contains vendors that have a nonzero balance.
  1. 1. In the Modules list, click Accounts Payable.

    2. In the Accounts Payable pane, click Voucher and Adjustment Entry in the Input area.

    3. On the Customize menu, click Customize Mode.

    4. On the Customize menu, click Insert Object Wizard to open the Insert Object Wizard (91.252.00) screen.

    5. Click Button, click Apply, and then close the Insert Object Wizard (91.252.00) screen.

    6. Left-click the new button, and then drag the button to the Voucher and Adjustment Entry (03.010.00) screen.

    7. Right-click the new button, and then click Property Window to open the Properties dialog box.

    8. On the Caption property, type Print.

    9. Right-click the new button, and then click Visual Basic Editor to open the Microsoft Visual Basic screen.

    10. Copy the following code into the Microsoft Visual Basic screen.

    For Microsoft Dynamics SL version  7 and earlier:

    Private Sub Button1_Click()


    Call ApplSetParmValue("", "", "03670/RUN")


    Call ApplSetParmValue("", "", "03670S/FORMAT")


    Call ApplSetParmValue("", "", "vr_03670s.CurrBal >0 /WHERE")


    Call ApplSetParmValue("", "", "/PSCRN")


    serr1 = Launch("ROI", True, True, 0)


    End Sub


    For Microsoft Dynamics SL 2011:

    Private Sub Button1_Click()


    Call ApplSetParmValue("", "", "03670/RUN")


    Call ApplSetParmValue("", "", "03670S/FORMAT")


    Call ApplSetParmValue("", "", "{vr_03670s.currbal} >0 /WHERE")


    Call ApplSetParmValue("", "", "/PSCRN")


    serr1 = Launch("ROI ", True, True, 0)


    End Sub


    11. Click Save, and then close the Microsoft Visual Basic screen.

    12. Close and then reopen the Voucher and Adjustment Entry (03.010.00) screen.

    13. Click Print to test the customization.

↑ Back to the top


References

For more information about how to export a report to a file, click the following article number to view the article in the Microsoft Knowledge Base:

930447 Description of the parameters that you can use to automate the export of a report to a file in Microsoft Dynamics SL

↑ Back to the top


Keywords: kbmbspartner, kbexpertiseinter, kbexpertiseadvanced, kbmbsmigrate, kbhowto, kb

↑ Back to the top

Article Info
Article ID : 932131
Revision : 2
Created on : 2/2/2017
Published on : 2/3/2017
Exists online : False
Views : 181