Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report Design Question Post Reply Post New Topic
Author Message
TTrV
Newbie
Newbie
Avatar

Joined: 10 Mar 2010
Online Status: Offline
Posts: 2
Quote TTrV Replybullet Topic: Report Design Question
     Posted: 10 Mar 2010 at 10:34pm
I'm pretty new to Crystal Reports and have been thinking about this issue for awhile but haven't been able to come up with a solution.  Hoping someone here can help me.
 
I have a table with invoice information.  There are multiple rows for an invoice_num for each item purchased in the invoice.  The final item rung up for that particular invoice will have the total price for the invoice.  Like below
 
   invoice_num     item    quantity      price       cost      total        cust_num
                    1    socks              2     $3.00     $1.00                            111
                    1    t-shirt              1    $10.00    $5.00                           111
                    1    discount          1    -$2.00                                         111
                    1    pants              1    $20.00   $13.00   $34.00             111
                    2    t-shirt              1    $10.00    $5.00    $10.00            110
 
I am trying to create a report to grab information from all invoices that have the item 'discount' within the transaction and display the total number of uses, the distinct count of cust_num, the average sales (avg. of total).
 
Any ideas where I should start?
 
Thanks
     
 
TV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Mar 2010 at 8:51am
Can you create views or Stored PRocs to use as your source or are you stuck with Crystal solutions only?
IP IP Logged
TTrV
Newbie
Newbie
Avatar

Joined: 10 Mar 2010
Online Status: Offline
Posts: 2
Quote TTrV Replybullet Posted: 11 Mar 2010 at 9:38am

The database is basically in dBase which I don't think you can do much with.  Seems like I'm stuck with Crystal Report solutions only.

TV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Mar 2010 at 10:38am

Try doing a COMMAND to select the invoice numbers where discount was used athen use that to inner join into your table.

Select DISTINCT invoice_num
from table
where item='discount'
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum