Site Search:
Sign in | Join | Help
4Penny.net

Dynamics GP

Notes, Tips and Tricks on Developing in Dynamics GP

Logging actions before printing reports

From a recent email:

I have a stored procedure with a select statement that returns the info necessary to create an SOP invoice.  I currently use this stored procedure to create invoices in Crystal Reports and fax them out using Rockton’s DRM.  I would like to add to the stored procedure, so that every time it is ran, a note for the invoice printed is appended to a text field in collections management.  The notes in collections management are stored in cn00300 as text fields with the headers in cn20100.

A:
This is probably not work billing for… but I will if you make me.

All you have to do is put an INSERT statement before the SELECT statement in the stored proc. Set

SET NOCOUNT ON

So that you don’t generate extemporaneous messages whilst doing this. Are you ok with the insert statement? If not, that might take an hour to develop, nothing more.

Matter of fact, chew on this:
For every report that you write, base it on a stored proc. For every stored proc that you write, insert into ‘myReportLog’ the name of the report, and the time that you run the report. Imagine how useful that would be when it came time to do maintenance or upgrade. You’d know which of your 20 reports are actually being used.

I currently do this for several clients.
 

 

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.