Solved

Too many columns creates unwanted extra width, how to achieve wrapping?

Posted on 2004-09-27
7
1,156 Views
Last Modified: 2010-11-11
I have created a crosstab report that selects all the data correctly. There is a variable number of columns and rows. If all the data fits onto one page everything is fine. If there are more rows than will fit onto one page it is handled correctly. However if there are more columns than will fit onto the page they flow onto the virtual page and print on a separate sheet with no headers or footers, no page number, and of course the row headers are not printed.
How can I control the number of columns selected for the crosstab, and make the whole table repeat for the excess columns?
I am using Crystal Reports 10 and selecting my data from an Access database.

Many thanks,
Graeme.
0
Comment
Question by:BleedinFingers
7 Comments
 
LVL 10

Expert Comment

by:ebolek
ID: 12162656
check these out

support.businessobjects.com/tips/basic_reports_archive.asp
support.businessobjects.com/communityCS/TechnicalPapers/scr7_crosstabs.pdf.asp

Regards
Emre
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12162668
Also read this :

Printing Cross-Tabs that span multiple pages
When you create a Cross-Tab that is wider or longer than the specified page size, the program automatically spans the printing across enough pages to accommodate the size of the Cross-Tab. In the Preview tab, a line will appear at each page break. For ease in reading, column headings will be repeated on subsequent pages. Row headings can also be repeated using the Keep Columns Together option.

To repeat row labels
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.

Click the Customize Style tab.
Select the Repeat Row Labels check box, if desired.
Crystal Reports lets you designate report objects that don't expand horizontally, such as text objects, field objects, OLE objects, charts, maps, lines, boxes, and so on, to be repeated on each additional horizontal page that a Cross-Tab creates. For more information, see Repeating report objects on horizontal pages.
0
 
LVL 10

Assisted Solution

by:ebolek
ebolek earned 100 total points
ID: 12162680
To repeat objects on horizontal pages
Right-click the report object you want to repeat.
On the shortcut menu, click Format Field, or the appropriate format option.
Note:    Formatting options are not available if the object you select is connected to the Crystal Repository. For information about modifying an object in the repository, see Modifying objects in the repository.

On the Common tab of the Format Editor, select the Repeat on Horizontal Pages check box.
For a line or a box, the Repeat on Horizontal Pages option appears on the Line or Box tab.

Click OK to save your changes.
Now, if a cross-tab or OLAP grid makes your report expand horizontally, the object you formatted is repeated on each horizontal page.

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 77

Expert Comment

by:peter57r
ID: 12162724
Hello BleedinFingers,

Given that you are using the first version of CR where almost all this is possible then what a shame ...

Right click on the object you want to repeat and 'format field'.
On the common tab, select 'repeat on horizontal pages'.

I don't know how you can work out how mant columns there will be; but if you want to creat a lopp then you will have to do it outside of CR in a VB (or similar) front-end.


Pete
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 400 total points
ID: 12164213
BleeninFingers,

If you want your report to paginate horizontally, then check out the comments above.

To directly answer your question, "How can I control the number of columns selected for the crosstab, and make the whole table repeat for the excess columns?":

You have two options:

1)  Identify sets of columns values (10 values, for example).  Select data with these values only using the Records Selection Criteria.  Since you may have additional values, you would then need to create one or more subreports** , each of which has a specific set of values.  You could then format the container report and subreports, so that your overall presentation shows multiple vertical crosstabs, each of which has a finite number of columns.  This approach works, but may not look as professional as it should.  The reason is because one crosstab might only have 2 columns, but another might have 10.

2)  Create manual crosstabs.  This can be pretty complex and tedious, but it works well if you want a finite set of columns.  Since you want multiple vertical crosstabs, you'll also need to use subreports** for this solution.

To create a manual crosstab, you'll need to Group by your row field.  Next, create text column headers for as many columns as you want.  Then, you'll create a series of formulas, one for each column.  A sample formula might look something like this:

//@sample column formula
//assuming a numeric Qty field
If
  {table.field} = 'Column Value 1'
Then
  {table.Qty}
Else
  0

You'll place these formulas in the detail section of the report, in their respective columns (identified by the Headers you created).  You'll then right click on each formula and Insert Summary in the Group Footer for the Row Group.  Lastly, you'll hide the detail section.  Voila!  You have a manual crosstab.

**Since you want multiple vertical crosstabs, each of which with a finite set of columns, you'll need to use subreports.  Save the report you just created.  Then save the report again as a different name. Modify the newly saved report by changing the column values in the Record Selection Criteria (Option 1) or in the formulas and text headers (Option 2) to be equal to the next set of columns you need.  Save the new report.  Repeat for as many subreports as you need.  

Insert each new subreport into the Report Footer of the container report.  If it helps, create multiple Report Footer sections, one for each subreport.  This keeps things tidy.  If your report is parameterized, then you'll need to link the subreports, otherwise you won't need to.

~Kurt
0
 

Author Comment

by:BleedinFingers
ID: 12165067
Many thanks for all these wonderful responses.  I will get back to you all soon once I've had a chance to evaluate them.
Graeme.
0
 

Author Comment

by:BleedinFingers
ID: 12168602
Hi all,

Kurt, I think your response most directly addresses the question I posed, however ebolek's 2nd response was the most helpful.  Can you both help me a little further?

Where the crosstab has spanned additional pages horizontally and I print I get 4 pages.  The first page is labelled "pg 1 of 2" and contains the first rows of the table, the second page is not labelled and contains the spanned columns.  The third page is labelled "pg 2 of 2" and contains the later rows and a fourth page is not labelled and contains the last rows and spanned columns. (Hope that's not too convoluted.)

I think the whole report would work if I could get the spanned horizontal pages numbered (ie "pg 2 of 4").  I'm sorry that the context of this question is moving, this will be the only modification to the above question.

I have no help files or manuals, although the version I'm using is based upon version 10, I'm using a third party's implementation of it.

Thank you for your patience and help.
Graeme.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question