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

Data display for few lines

Status
Not open for further replies.

foru11

MIS
Aug 25, 2011
38
MY
Hi all. I am using CR 10, SQL Server 2008.

I am not sure how to put the title for this thread. I am asked to create a report with below scenario:

Data in table:
Section Type Seq Status
6000 H 1 S
6001 H 1 S
6001 H 2 S
6001 H 3 S

The Seq can goes up to maybe 50 having same Section and Type.
Result:
Section Type 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
6000 H 1-S
6001 H 1-S 2-S 3-S

“1-S” is the combination of Seq + ‘-‘ + Status. The maximum numbering for a line is 15. If the Section having > 15 records, it will go to next line where it should look like below:
Section Type 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
6000 H 1-S
6001 H 1-S 2-S 3-S 4-S 5-S 6-S 7-S 8-S 9-S 10-S 11-S 12-S 13-S 14-S 15-S
16-S 17-S

I am thinking of insert a grouping by Section (GH1) and by Type (GH2). Create formula for each Seq + Status (but this will be result in a lot of formula if the record reach 100) and insert a Summary (Maximum) for each of the formula. Also, create few GH2 and placed the summary at Type group. I know this looks silly to do but I can’t think of a better way (forgive for my stupidity coz I'm still new to CR). I’m sure there is a much better solution than mine.

Hope to get advice from here. Thanks in advanced.
 
Does it have to be horizontally displayed, or could you pivot this?

It is possible to insert a crosstab to do this, and it would create virtual pages to the right as necessary. Would that meet your needs?

-LB
 
Yes, it has to be horizontally as being informed.

But if insert a crosstab, would it be easy for viewing like the result showed above? If it does not giving much difficulties for viewing/reference, maybe I could show to my boss the result to see whether he could accept it.

Thx.
 
Insert a crosstab and add Section and Type as row fields, Sequence as the column field, and maximum of {@Seq+Status} as the summary field. In the customize style tab, check "suppress subtotal" for the top level row, and then also you can check "repeat row labels" so they will appear on the virtual pages to the right and uncheck "show cell margins" to save space.

You can also add both page number and horizontal page (add a hyphen for a prefix) into a text box, so that you can easily collate the results for hard copies or to understand your location when viewing.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top