Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing statements for past due customers?

Status
Not open for further replies.

toomes1

Technical User
May 12, 2005
43
0
0
US
Is there a way to just print the statements for customers that are past due as of yesterday as opposed to having to go into the aging report and pick which are late and then putting these customers into the monthly category and printing those statements, unfortunatley when it is done this way we have to remove or add to this category according to there being late or not and it is quite time consuming.
 
Write a piece of SQL to do this automatically nightly.

At a customer we put a sql script in that set the statement frequency flag to monthly if they had a balance of over $50 in the over 30, over 60 and over 90 buckets. Then when they print statements manually, they select monthly statement frequencies and they only get customers with at least $50 past due. Saves a lot of paper.

Better yet, get a crystal report for your statements, use event manager, and email the statement to them.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
That snds like what I need to do, Do you have an example of what this SQL code would look like,, and how I would introduce it to my system.
 
This is a 2 step process. First setup a deferred report, to run ALL statements nightly, or as needed, and spool this to a file. The statement deferred report will recalc and update the current, over 30, over 60, over 90 buckets in the ARCUSFIL_SQL.

Then use the following code:
Code:
update ARCUSFIL_SQL 
set stm_freq = 'D'
where amt_age_prd_2+amt_age_prd_3+amt_age_prd_4 >10

The above code assumes no statements to anyone unless that have at least 10 bucks past due. Change this according to what figure you desire.

To get this code to run, open up Enterprise Manager and go to server, Management, SQL Server Agent, Jobs. Right click and select new job. Name it go to tab 2 steps, hit the new step button, and paste the code above in there. Make sure you are in the correct database. Go to tab 3 schedules to schedule it. It is pretty straight forward.

Let me know if you have any questions.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I really appreciate your help,,,I'm new at Macola and SQL as you can probably tell..If you could explain how to go about doing this I think I'll be all set

"First setup a deferred report, to run ALL statements nightly, or as needed, and spool this to a file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top