Home » Listing Details
Top Websites
  1. Mark Polino's DynamicAccounting.net
    Over 3700 resources listed.
  2. Developing for Dynamics GP - By David Musgrave and the MS GP Dev Support Team
    Over 700 resources listed.
  3. Mariano Gomez at The Dynamics GP Blogster
    Over 600 resources listed.
  4. Mohammad Daoud's Dynamics GP Blog
    Over 400 resources listed.
  5. Microsoft Dynamics Partner Community Blog
    Over 400 resources listed.
  6. Vaidy Mohan at Dynamics GP - Learn & Discuss
    Over 400 resources listed.
  7. Dynamics GP Help
    Over 400 resources listed.
  8. Christina Phillips, Steve Endow & Lorren Zemke at Dynamics GP Land
    Over 300 resources listed.
  9. Frank Hamelly at GP2theMax
    Over 200 resources listed.
  10. About Dynamics, Development and Life
    Over 200 resources listed.
  11. eOne Business Solutions Blog
    Over 200 resources listed.
  12. Inside Microsoft Dynamics GP Official Blog
    Over 200 resources listed.
  13. VS Tools Forum
    Over 100 resources listed.
    Your Resource for Visual Studio Tools for Dynamics GP
  14. Inside Microsoft Dynamics GP Official Blog
    Over 100 resources listed.
  15. Janakiram M.P. at DynamicsBlogger
    Over 100 resources listed.
  16. Victoria Yudin's Dynamics GP Website
    Over 100 resources listed.
    Victoria Yudin
  17. Catherine Eibner MBS Developer Evangelist
    Over 100 resources listed.
  18. Sivakumar Venkataraman at Interesting Findings & Knowledge Sharing
    Over 100 resources listed.
  19. Dynamics CPM
    Over 100 resources listed.
  20. Dynamics Small Business
    Over 100 resources listed.
  21. Belinda, The GP CSI
    Over 100 resources listed.
  22. Rose Business Solutions Blog New
    Over 100 resources listed.
  23. Microsoft Dynamics GP UK Blog
    Over 100 resources listed.
  24. Leslie Vail at Dynamics Confessor Blogspot
    99 resources listed.
  25. Michael Johnson at MBS Guru
    96 resources listed.

ID:8891
Title:Hybrid - Adding Named Printers control to Reports using VBA
URL:http://blogs.msdn.com/developingfordynamicsgp/archive/2009/01/14/adding-named-printers-control-to-reports-using-vba.aspx
Description:

Named Printers is a module to allow controlling of the printer and settings used when printing reports.  It was originally developed for v3.00 by me while I was working for Sequel Technology (that's why the tables and calls are prefixed with ST).  Later it was purchased by Great Plains for v5.50 and included in core code (Dynamics.dic) for v6.00 onwards.

Named Printers works for any report that is set up to call Named Printers, but what happens when you want Named Printers control for a report that is currently not supported... Well, you can use VBA to call the appropriate Dexterity sanScript functions via the Continuum Integration Library to add a new Named Printers Task to the Assign Named Printers window.  Then the code can read the setting for that Task and change the application default printer just before the report is printed.  After the report is printed, the correct default printer is restored using the System Default and Company Default printers.  The Company Default printer takes precedence if one is set up.

This example adds Named Printer control when printing from the Inventory Transaction Inquiry window when using the window print button. The code is configured so that the Printer Task is only available from the Assign Named Printers window while the Inquiry window is open.  When the window is closed the Printer Task is removed and the settings selected are removed.  To make the settings permanent, you will need to comment out the "clean up" script when the window is closed. 

NOTE: This customisation uses a method of executing Dexterity sanScript code from VBA which is unsupported by Microsoft.

Example code for v8.0, v9.0 & v10.0 is attached at the bottom of the article.

Please see the "Installation Instructions.txt" file in each version's archive for more information.

Category:DEVELOPMENT: VBA
Link Owner:
Date Added:June 17, 2010 02:11:48 AM
Number Hits:2
RatingsAverage rating: (0 votes)
Reviews

No Reviews Yet.

 
GPWindow.com

Developed and presented by
Smith & Allen Consulting, Inc.,
GP specialists since 1991.