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

Horizonal display of data 1

Status
Not open for further replies.

gav12345

Programmer
Dec 4, 2003
198
GB
Hi,

Using CR10 against an Oracle 9i database. I need to display database field data horizontally in the report header, i.e. this field...

PH Animal ID
D 1
2
3
4

...needs to be displayed in the report header as

RH Animal ID 1 2 3 4

I know how I'd do this for instance in the Animal ID group, by just building up a string, but don't know how I'd display all the Animal ID data in the report header.

Hope this is reasonably clear, thanks in advance for any suggestions.

Gavin

 
Thanks dgillz, but Ken's solution assumes that you are displaying the formula within a group. - I need to display it in the report header. I could create the string in the Animal No group, but my understanding is that because any group formulas are calculated after the report header, it would not be possible to display this in the report header?

Thanks, Gavin
 
So you are not grouping at all? What about sorting? Would the values at least be sorted together?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
You could insert a crosstab in the report header that used Animal ID as the column, and with maximum as the summary. You can suppress the column labels, remove the grid and change the "Total" label to "Animal ID".

-LB
 
LBass, dgillz, thanks. The crosstab works perfectly, but for the sake of simplicity (and because I didn't think I'd be using crosstabs) I'd ommitted part of the problem. In fact I'm trying to display 3 lines of data, one beneath the other, with the data alligned (don't think this will be alligned when I actually submit this post, but its supposed to be), i.e.:

Animal ID 1 2 3 4
Item Control Item1 ----Item2----
Days 1-9 10-19 20-30 20-30

This wouldn't be too much of a problem with individual formulas, but using crosstab(s) it will get messy. Is there any way I can display the result of a formula calculated within a report group, within the report header? (dgillz, yes, I am grouping by Animal ID in the report, but I thought that this was irrelevant as long as I wanted to display the end result in the report header?).

Thanks again, Gavin
 
Are what you show for item and days the field results for each or is the days result a formula? If so, what is it? You could potentially concatenate the three fields with returns (chr(13) and use that formula as your summary in the crosstab. You could similarly create a formula using returns that could display the three field labels instead of the "total" row label.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top