Link to home
Start Free TrialLog in
Avatar of Cluskitt
CluskittFlag for Portugal

asked on

Printing a Crystal Report spanning two (or more) pages horizontally

We are creating a few crystal reports for various pages. In some of them, there are multiple columns (for the purposes of this question, let's define it as 50), which we would like to print as 25+25. That is, 25 columns on one page, 25 on another. If the page has enough rows for 2 pages, then it will print 4: 2 for the first 25 columns, 2 for the second.

So far, we've failed to achieve this. Both crystal reports viewer print function and adobe acrobat's (after export) show the exact same options. By default, it will resize to fit in one page (making all the columns extremely hard to read). If we configure it as landscape and real size, it will only print one page and disregard anything that shows on the right.

Any solutions for this?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James0628
James0628

I don't think there's going to be any easy way to do this.  One option might be a subreport.  Put your first 25 columns in the main report, and have a subreport in the report footer read the same data and produce the second 25 columns.  Or use 2 subreports, one for the first 25 columns and a second one for the second 25 columns.

 One basic problem with the subreport idea is that if the report runs over 1 page, you'd get all of the pages for the first 25 columns, and then all of the pages for the second 25 columns.  But if you can live with that, then it might work.  I suppose if you know how many records will fit on a page, and the report will never be more than a few pages long, then you might be able to use a separate pair of subreports for each page full of records.  It may not be easy/pretty, but it might be possible.

 The column headings may also be a problem if the subreport is more than 1 page long.  I'm not sure.

 Depending on the circumstances, mlmcc's Excel suggestion may very well be the easiest solution.

 James
Avatar of Cluskitt

ASKER

None of those solutions can be made to work. Letting the users view the report in excel is out, due to policy reasons. The ouput can't be changeable in any way.

As for the rest, there are two different situations which have to produce the same results:

1- The user is viewing the report in a page with a crystal reports viewer. We could try to set up a couple viewers and use one for each half of the page. It would require some effort, but I guess it could be done.

2- At some point in time, the report will generate a pdf. From then on, the user will always view the pdf file and never again will he access the report. Printing from the pdf will have to produce the same results. This can't be achieved using the two reports solution.

I guess that if there was any way to generate the pdf file in a way as to print over 2 pages, then that would be enough. However, we can never know how many rows will be returned. In some cases, enough for a couple pages. Rarely will it ever reach three. Mostly, just one. However, it has to be set up in a way that works for however many are generated.

I'm not sure how the subreport in the footer solution would work. It has to generate the same amount of rows and has to be aligned with the first page. I don't think it would do either.

It seems that there is no option other than trying to squeeze things in to fit A4 (we've tried to set the page size on the report to A3, but it didn't work).
What is the data you are showing?

Is it possible you could use a cross tab?

mlmcc
A cross tab is a possibility we're looking at, but the general feeling for now is that it is too much effort to turn it into one and it would be easier to just resize things.
Although we have yet to have enough time to get the cross tab to work, it seems that it is the only way to get something close to what we want.