Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: layout Problem Post Reply Post New Topic
Author Message
AdamField
Groupie
Groupie


Joined: 04 Jun 2009
Online Status: Offline
Posts: 88
Quote AdamField Replybullet Topic: layout Problem
    Posted: 18 Oct 2010 at 2:04am
Hey all,
 
Our local accountency software prints reports out with as source a DBF file.
 
Now for a long time it looked a bit like this
 
 
Product  |    Discription   |  amount |  Price  | Total Price|
 
 
123456       cardridge 12        2           5€          10€
789101       cardridge 13       1             5€           5€
 
The info of what the custumer ordered was in that dbf with 1 record for every product (a product per line)
 
Now they patched the software so it is able to show if the amount of products the customer ordered are also in stock, but in stead of adding a extra kolum in the dbf file they did it with a extra record line.
 
 
 
Product  |    Discription                       |  amount |  Price  | Total Price|
 
 
123456       cardridge 12                              2           5€          10€
                  "amount on stock  2" 
789101       cardridge 13                             1             5€           5€
 
where the amount on stock 2 is a single field of characters
they did make a record type field so it is possible to see if the record is a real order line or a information line
with a simple
IF record type = 48 Then right ({discriptionField},2)
i can filter out the amount of articles reserved already and place it under the mount colum.
 
Problem is that i would rather see that 2 in a extra colum next to the amount colum and drop the extra record like :
Product  |    Discription                       |  amount | reserved | Price  | Total Price|
 
 
123456       cardridge 12                              2             2           5€          10€
789101       cardridge 13                             1              0           5€           5€
 
and add a zero in case nothing is reserved for that customer.
I'm looking for a way to use a field from the next record so that i can make it look a lot better as how it looks now.
 
Tnx for the feedback !!
 
Adam
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Oct 2010 at 3:09am
I would try a store proc, or a left join on the table to itself (that way you can check for a null which would be a 0) which would give you all the info on 1 line, but would return 2 records (1 with all the info, and one with the extra row doubled)...you would have to filter out the doubled line (or in the join condition put a condition that removes it)
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.