cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 2008 - Excel output doesn't match setup

Former Member
0 Kudos

Hi, fairly new to Crystal Reports development.

My report setup in Crystal produces a decent PDF output.

I have issues with the Excel output.

I have applied the following setup for my reports:

- Landscape, 8 1/2x11 letter size, all margins 0.25"

- All column headers and data fields are aligned to guidelines

- All String fields are formatted to 'Can Grow'

When I generate to Excel, the report is too wide unless I choose 'Fit all columns on one page' in Excel print options.

The report is fine in PDF output.

Why is the Excel output not formatted to fit all columns on one page in the first place?

Thanks.

Steve

Crystal Reports 2008

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Steve,

Not everyone wants to have their Excel print.  It's not uncommon for spreadsheets to be 20, 30, 50 columns wide.  So automatically exporting to Fit all columns would make that pretty difficult to see.

I do agree though there should be an option for fit all when you export to Excel.

Brian

Former Member
0 Kudos

Hi,

See these needful threads:

Thanks,

DJ

Former Member
0 Kudos

I develop my reports locally but they are uploaded to our SaaS's web server and Crystal Server renders the reports as a web application.

When I changed the Export settings to Excel - Data Only and removed page headers, there was no difference when I ran the report on our web application.

Does tweaking the Export settings have to be made on Crystal server, or locally? 

Thanks.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ludek, so when this (or any report that we have developed) is generated to PDF, it prints fine:

When I generate to Excel, the report is formatted quite like the PDF and thus I would expect it to be formatted for the page size.  However it always is too 'wide' for the selected page size. Here is Print Preview in Excel, the right-side of the report is cut off (not so much on this report, more so in other reports):

I have to select "Fit all columns on one page" to make the report fit to the page size:

In this example, the report wasn't so 'wide', in other reports I have it's worse.

You can see in the screenshot of my Crystal source, I applied SAP's best practices of everything lined up to guidelines, etc.

I think the Excel output should fit the page size off the bat, I should not have to "fit all columns to one page".

Any ideas?

Thanks!

former_member183750
Active Contributor
0 Kudos

An interesting approach to report design (and I don't mean that in a bad way ), though testing a report with data in the CR designer, then testing the report in the web app is probably a better way to go.

A few questions:

From the screenshots I can not tell if the report is designed in landscape of portrait mode. Only thing I can tell is that the pdf export appears to be landscape and xls portrait. E.g. what mode is the report designed in?

What is the default printer driver on the server?

What is the printer driver used on the computer where the reports are being created?

Are you exporting using the viewer export button or is the export done via the CR SDK code?

What does an export to Word look like?

- Ludek

Former Member
0 Kudos

Hi, Ludek.

- Report is developed as portrait, my PDF screenshot is just 1/2 vertical size. All outputs are portrait.

- Excel output is always too 'fat' regardless if portrait or original, Excel output never fits the proper width for the given page size.

- I choose File > Page Setup > Printer Options > select No Printer checkbox in my .RPT file. 

- Don't know default printer driver on server.

- Exporting via CR SDK code

- I have no way of exporting to Word

I'll refer your questions to our developer. He may get some ideas

Former Member
0 Kudos

It makes no sense to me that a report that is formatted to fit on a letter size page as a PDF, is exported to Excel, formatted by Crystal to look like the PDF output, but doesn't come close to printing on a letter size page (output is too wide).

I have followed all best practices religiously:

- use guidelines

- fields don't overlap but share guidelines

- every field in section aligned

- use blank text boxes to vertical space

former_member183750
Active Contributor
0 Kudos

Can you attach the report with saved data?

- Ludek

Former Member
0 Kudos

Hi Ludek. If you'll forgive me, I don't quite understand your request.

The only way I can run reports with data is to upload them to our web application and then run them against customer databases there. Locally, all I do is tweak the formatting and layout on my computer.

former_member183750
Active Contributor
0 Kudos

Wait a minute. This is the 1st time I see that you are using an application that uses one of the CR SDKs(?!). E.g.; how do you test that this report works on the computer where you are designing the report?

- Ludek

Former Member
0 Kudos

Hi Ludek, I do not connect directly to a data source when I'm designing my reports. We have represented our data schemas as xml files and link to those in Crystal.

This allows me to choose and arrange fields and create formulas. Notice I have connected to the Bank Account Manager > Signatories table. Here is a report based on that, I can pull all the fields from the Signatories table into my report:

In addition to the .RPT file, there is also a .PBG 'property bag file' that tells our web app how to categorize the report and what filters are are available to users running the report.

In order to test the report, I upload it to our web application's Staging environment, which has internal test as well as mirrored subscriber databases.  Then I can run the report against that data and see how it looks.  We built an add-in that enables all this. So my process is BUILD (in Crystal) PUBLISH to the web app, VIEW and continue this process until the report is as I like.

I'm just printing out images of my issue, will post in a sec.

former_member183750
Active Contributor
0 Kudos

XLS export is quite tricky. See the following:

How to WYSIWYG SAP Crystal Reports Export to XLS

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Thank you Ludek, I will certainly look those documents over. Very kind of you.

In my mind, the Export to Excel feature should produce a report as formatted and ready to print as the PDF output, at least for our web app.  If the user wanted just a data dump, we have an Excel plug-in for that. 

Cheers,

Steve