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

How to display on the same line multiple records ?

Status
Not open for further replies.

akinia

Programmer
Nov 23, 2000
69
BE
Hi, everyone

I'm using CR 6.0.1.135 and I have a table with data like that:

Employee Number Userfield Value
--------------- ---------- ------
123 1 C1
123 2 2
123 3 CCN
124 1 H1
124 3 CCN
...

I want to display all the data for the same employee on one line; I've tried first to create formula field for each userfield but I get one result per line, and 3 lines.
Then I've tried to do it using the format with multiple column in the Format detail section, but the problem is if there is no data in userfield 2 like Employee Number 124 , The N°3 takes the place of N°2 and that's not correct.

I need a result like that:

123 1 C1 2 2 3 CCN
124 1 H1 3 CCN

Is there any solution ?

Thanks for yours answers




 
So you want a fixed number of columns?
How many columns?
One for each userfield? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
maybe a cross-tab would suit your requirements.
you would have employee number as the row and userfield as the column and then summarize (with maximum) the value. (this assumes only one value per employee & userfield combination - which may not be the case with your data).
The resulting crosstab might not be exactly the layout you described, but it may still suit your purposes.
hth Icytrue

icytrue@hotmail.com

 
Hi,

The Cross-Tab option is not the good one because it doesn't retrieve what I need in a good layout.

Thanks again

The userfield is replaced by his label, thus I need only a column for the value but there is one per userfield .Like that:

123 Label1 C1 Label2 2 Label3 CCN
124 Label1 H1 Label2 Label3 CCN
125 Label1 Label2 5 Label3
...
I hope you understand better what I try to do.


 
Create one formula for each column that says something like:

if {field} = "C1"
then {value}
else ""

Place these on the detail band.
Group the report by employee #
Do a maximum of each column by Employee
hide the details. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top