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

How to pull data from different fields onto the same line

Status
Not open for further replies.

computerman29651

IS-IT--Management
Aug 28, 2006
51
US
I am using Crystal 10 with Access

I am going to do my best to explain what I want to do with a crystal report.

I have a field named Product in crystal report, and I want to display the prices from different fields horizontally (side-to-side).

For Example:

Product Field Prices Field
Apple 2.00
Oranges 2.50
Grapes 1.50
Peaches 1.25

I am trying to do the following on the crystal report:

Apples 1.50 1.25

As you can see above, the numbers I need are not the prices associated with Apples, but other products. I do not want to display any other products on the report except "Apples". However, I want the results from "Grapes" and "Peaches" to display across from "Apples".

I hope I explained somewhat clearly what I am attempting to do. Please let me know if this is possible or not and if you need me to clear anything up.
 
Have you looked at a Crosstab? You find Crosstab on the Insert menu, and it guides you through the details.

Or you might try a 'Mock Crosstab' - something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. Crystal should have included an example along with the Crosstabs.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Not sure why you'd want to mix apples and oranges :), but you could create formulas like this:

if {table.fruit} ="Grapes" then {table.price}

if {table.fruit} = "Peaches" then {table.price}

Place these in the detail section and right click on each and insert maximums on them at the report level. Then sort the fruit field in descending order and place the fruit field in the report footer next to the summaries.

-LB
 
What if the component I need is not at the beginning of the list or at the end of the list, but in the middle?

For Example:

Product Field Prices Field
Apple 2.00
Grapes 1.50
Peaches 1.25
Oranges 2.50

Now, I want to display the following on the crystal report:

Peaches 1.50 2.50

As you can see from above, peaches are in the middle, and the results I want to display is from the 'Grapes' and 'Oranges'.
 
hi
create a grouup base on product
then in the group expert select specified order from the drop down list
there you can order the way to display your items

cheers


Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Then create a formula like this:

if {table.product} = "Peaches" then {table.product}

Insert a maximum on this also. These seem like very odd requirements though.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top