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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Periodical report preparation

Status
Not open for further replies.

rollythadikkaran

Programmer
Dec 15, 2003
1
IN
I have a table with following fields
date -> date of transaction
rec_iss -> to indiacate the receipt or Issue transaction.
quantity ->quantity
prodid -> product Id.
I required to generate a stock register for a specific period (from startdate to enddate) so that opening balance to be worked out till the startdate (if rec_iss = "R" then opbal = opbal + quantity else opbal = opbal - quantity) and it should be the first line in the report. Then the remaing records to be printed as shown below.
date rec_iss Quantity
1/1/05 R 10
2/1/05 R 15
4/1/05 I 5
5/1/05 R 3
5/1/05 I 2
if i ask the report from 2/1/05 to 5/1/05 then it should be as follows.

Date OpBal Receipt Issue ClBalance
2/1/05 10 15 25
4/1/05 25 5 20
5/1/05 20 03 23
5/1/05 23 2 21

I tried this in many ways..but could not succeed..So please help me...
Regards,
Rolly
 
Do two running totals, one for receipts and one for issues. And then a formula field for current balance, that finds the difference between them. And an 'opening balance, that is current balance with the receipt subtracted or the issue added.

Your example also does not show the first line. For a group, you can do this using a group count and suppressing a detail line when this count is 1.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top