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

Modifying certain records pulled from database

Status
Not open for further replies.

Trevoke

Programmer
Jun 6, 2002
1,142
US
So, I have Crystal Reports 8 and I'm pulling from a Btrieve database records of item transactions.

I'm trying to make the report more correct, as it pulls all transactions (even deletions of transactions) but without marking them; so it could look like we received 100, 100, 50, and 50 of an item, when in truth we received 100, deleted that 100, and then received twice 50 (e.g.).

I would like to know if it's possible to remove 100 when the record is a deletion (which I should be able to pull out easily) .. So assume variables are TransactionType and ItemQty.

I'm sorry that I'm a little vague, and I hope you can help me. Thanks in advance!

-Haben sie fosforos?
-No tiengo caballero, but I have un briquet.
 
Hi,
Please post the table(s) information ( for instance,is there a field that indicates the type of transaction - like Deleted, Reecived, etc).

If so, a simple record selection formula should be doable..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I'd do it by having two Running Totals, one for 'Received' and one for 'Deleted'. Add these up for a group of transactions, then use a formula field to find the difference.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.


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

Part and Inventory Search

Sponsor

Back
Top