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

ID:9003
Title:RW - Adding Line Numbers to SOP Documents Example
URL:http://blogs.msdn.com/developingfordynamicsgp/archive/2008/07/21/rw-adding-line-numbers-to-sop-documents-example.aspx
Description:

The following example shows how easy it is to use VBA to add a line number to a SOP Document.

There is a Knowledge Base (KB) article 857285 Secure Link which uses the Line Item Sequence field and dividing its value by 16384 to obtain a line number.  This works... well ... sort of.  As soon as a line item has been deleted or inserted, the Line Item Sequence field for the lines in the document will no longer be multiples of 16384 and so this method will start producing incorrect results.  This VBA example will always work.

By adding a blank calculated integer field to the SOP Blank Invoice Form at the beginning of the line item, we can then use VBA to populate this field with a value incremented as each line is printed.  We use the Report_Start() event to reset the counter variable and then use the Report_BeforeAH() event to increment the counter variable and update the calculated field.

NOTE: To ensure that only the H2 section is incrementing the counter, we use a select case statement in the Report_BeforeAH() event.

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:TIPS AND TRICKS BY MODULES: SOP
Link Owner:
Date Added:June 17, 2010 02:12:44 AM
Number Hits:28
RatingsAverage rating: (0 votes)
Reviews

No Reviews Yet.

 
GPWindow.com

Thank you for your support for GPWindow. It helps us cover part of the hosting costs for GPWindow.