cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Cross-Tab and dynamic number of columns

Former Member
0 Kudos

Hi Guys!

My Crystal Report is using Cross-Tab and has dynamic number of columns, which depends on a number of properties.

When report runs to the screen I can see all columns by scrolling to the right.

If I need to print this report or convert it to PDF I have issues.

The question is How can I determine the end of the page and move extra columns to the next page ?

I am using Crystal Report version 9, XI, and 2008.

Thank you,

Tanya.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Tanya

Try making the columns rows and the rows columns, it will be long rather than wide.

Debi

Former Member
0 Kudos

Debi,

I have a big number of rows as well, so this won't help.

Thanks,

Tanya.

former_member292966
Active Contributor
0 Kudos

Hi Tanya,

The problem is the dynamic number of columns. If you always knew there would be the same number of columns then you'd be fine.

The great thing about 2008 is you can set the papersize to Dissociate Formatting Page Size and Printer Paper Size. Now the preview at least is no longer tied to a specific paper size and you can croll to the right as far as you want.

Most of my crosstabs I've only needed to export to Excel so this worked great because I could have my columns as wide as I wanted and not have to try to fit everything onto a landscape legal letter. From Excel the user can print it and have Excel fit the columns onto a page.

It's an extra step but there isn't a way to properly force a page break at x number of columns. The best you could do is size your column widths so they don't get orphaned and cross your fingers.

Good luck,

Brian

Former Member
0 Kudos

Hi Brian,

This is great, I am exporting it to excel. The issue I still have however is this:

how to adjust the title section of the report in accordance with the width of the report based on the number of columns?

Thanks,

Tanya.

former_member292966
Active Contributor
0 Kudos

Hi Tanya,

If you have a title other than your column titles in your crosstab, I recommend removing it from the crosstab and dropping it onto the report itself. This way it will at least align with the first page of the printout. Otherwise the title could be on one of the subsequent pages.

This may require creating a group on the report and having the crosstab in the group footer section and the title in the group header, depending on how the data and report is formatted.

Good luck,

Brian

Former Member
0 Kudos

Hi Brian,

The title section is on the Page header section.

former_member292966
Active Contributor
0 Kudos

Hi Tanya,

Stretch the title to the width of the first page. If you expect your users to print landscape on legal paper then from the left margin stretch it to about 13 1/2 inches and center justify.

That's about as good as you can get.

Thanks,

Brian

Former Member
0 Kudos

Brian, the report title is stretched to the entire width of the Page Header section, but because my cross tab brings a lot of columns, and goes far beyond the page width the report title comes out more to the left than in the center of the report, meaning that the report title section in the Page Header is mot dynamic.

former_member292966
Active Contributor
0 Kudos

Hi Tanya,

Now I understand. I thought you didn't want it centered across the entire width of the report.

When you right-click your title and go to Format Text. In the Common tab is an option to Repeat on Horizontal Pages. This will show the title on each page going across but there's no way to have it print only on the center page.

I looked at trying to use the Horizontal Page number but unlike the regular Page number there's not Total count for it so. This option also does not have a formatting formula option.

Thanks,

Brian

Former Member
0 Kudos

Hi Brian,

I tried this, but it didn't really look good because the title repeats on the next horizontal page even if the cross tab only goes until the first quarter of the next page.

I was thinking about adding the report title to the cross-tab itself, that would make it dynamic. Any idea how?

Thanks,

Tatyana.

former_member292966
Active Contributor
0 Kudos

Hi Tanya,

I looked at trying this and was about to give up BUT I think I have it.

Create a formula with just your title in it.

Add it to your columns in the cross tab and have it at the top.

This will now appear on the top of each page and will be the same length as the crosstab, regardless of the number of columns.

Thanks,

Brian

Former Member
0 Kudos

Hi Brian,

I did it too, it does work.

Thank you for everything.

Tanya.