Categories
Crystal Reports Printers Ripplestone Ripplestone Tips Web Viewer

Printer Setting for Crystal Reports and Ripplestone

When publishing a Crystal report to Ripplestone, it helps to change the printer settings for the report to use the No Printer option.

When you create a new Crystal Report you normally set the report to print on a local printer.  While the report will run great for this printer it might not run when you publish it to Ripplestone and run the report using the web viewer.

A common message would be:

The page size was not large enough to format the contents of an object in the report.

Failed to export the report.

The reason for this error is that the web viewer has different margin and sizes that the printer that was selected and when the report is run it’s not able to fit in the new web viewer size.

To fix this problem open the Page Setup dialog box from within Crystal Reports and select the “No Printer (optimize for screen display)” option at the top of the box.  Save the report and make sure that it can be run without an errors.  If you get display errors then you can either change the margins on the Page Setup dialog box and/or change the layout of the report to fit within the new report dimensions.  After you get everything working in the report you can re-publish the report to Ripplestone and it should be able to be displayed in the web viewer and the pdf viewer.

image

Categories
Crystal Reports Ripplestone Ripplestone Tips

Truncating Fields in the Crystal Reports Web Viewer

The Problem

There are times when building a Crystal Report that you want a field to be short and if the data is too long for the field for it to be truncated.  This works fine when developing the report in the Crystal Reports Designer, but when you publish the report to Ripplestone and run the report the data in the field will overlap with the field(s) to the right. 

The screenshot below is from the Crystal Reports Web Viewer and the HTML that is generates allows the data to “spill-over” to the two fields to the right of the Title field.

FieldOverlapWebViewer

What you want it to look like is this.  The screen shot below is the same report, but the viewer in Ripplestone was changed to pdf.  When exporting to pdf Crystal Reports does the proper thing and truncates the data in the Title field to the length that was set at design time.

FieldPDFViewer

 

The Solution

To fix the problem we need to head back to the Crystal Reports Designer and make a change to the field that is overflowing (the Title field in the example).  Open the Format Editor by right clicking on the field and selecting the Format Field option.  On the Common tab we want to check the Can Grow option and set the Maximum number of lines to 1.

CRFormatEditor

After making the change to the report you can re-publish the report to Ripplestone and the field should be truncated and will fit the set width.  Below is the report in the Crystal Reports web viewer after the Can Grow option has been checked.

FieldAfterCanGrow

 

Conclusion

If you have a field in a Crystal Report that needs to be a specified width and cannot flow over to other fields and you need to view the report in the Crystal Reports Web Viewer you will need to set the Can Grow option along with the Maximum number of lines option.  Setting these two options in the Crystal Reports designer and then publishing that report to Ripplestone will cause the field to be truncated when displayed with the Crystal Reports Web Viewer.

Thanks to Patrick Kansa for help with this solution.