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!

Sales - Cost = Gross Profit

Status
Not open for further replies.

crystalpro

Technical User
Jan 22, 2002
95
US
crystalpro (TechnicalUser) 20 Jun 05 18:38
How do you get the cost for an item sold in Crystal Reports v9?

I have tried:

if {jrnlrow.rowtype} = 1 then GetPeachRowAmountv2

but it only returns 0.00's for every item sold.

I have a record selection:
{jrnlrow.journal} = 3

3 = the sales journal

columns on my report include:

customer
invoice #
date
item
sales amount
cost of goods sold
gross profit

I am using the following tables:
company
chart
customers
jrnlhdr
jrnlrow
lineitem

 
Please explain your table linking. Also what does {JrnlRow.RowType}=1 mean?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I use "left outer join" on all links:

JrnlRow.PostOrder to JrnlHdr.Postorder
JrnlRow.ItemRecordNumber to LineItem.ItemRecordNumber
JrnlRow.CustomerRecordNumber to Customers.CustomerRecordNumber
JrnlRow.GLAcctNumber to Chart.GLAcctNumber

If JrnlRow.RowType = 0, it is a normal transaction, like the sales amount on an invoice.
If JrnlRow.RowType = 1, it is a cost of sales transaction, performed behind the scenes of the invoice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top