How to export a crystal report as an Excel document

Source: Internet
Author: User
As we all know, exporting a crystal report to an Excel file is very simple. The general practice is to design a report in the designer, select File> export report ], in the displayed dialog box, select excel as the export format. Note that if the exported Excel document is required to maintain the design format of the crystal report, you cannot select the [Microsoft Excel 97-2000-data only (xls)] Option. There seems to be so much to be said, but many customers in the actual project complain that the Excel page exported from the crystal report is very inaccurate, and fields are misplaced, resulting in redundant cells. So how can we make exported Excel documents more perfect? We recommend that you follow these steps when developing a crystal report. The quasi-line and border Crystal Reports function is provided for normal report on the determine factor to help accurately align and adjust the report object size. A baseline is a number of non-print lines that have an alignment to automatically align objects with it. A report object that is aligned to a quasi-line can be moved along with the line. The crystal report automatically adds a line for each field. The work we need to do is to move the line so that each field is accurate together. The standard is that Red Cross stars appear between two fields, as shown in: in order to display better results, we add the left border and bottom border to the three fields in the details, and add the right border to the "last year's sales" field. For the names of the three fields in the header, we add the bottom border. Shows how to preview the data in a crystal Report: After the data is exported to excel, as shown in figure: Use gridlines
Another method is to use grid lines for alignment control. First, you must enable the gridline function by selecting View> grid> Design, placing database fields in details, and adjusting the field size to align with the gridline, each field must be close to each other and the edge must be superimposed, as shown in figure: the borders of each field can overlap completely with the grid lines. Adjust the detailed information section height to adapt to the field height. Otherwise, a blank row is displayed after the Excel file is exported. Shows the result of exporting an Excel file: by default, the size of each cell is much larger than the field content during the cross tabulation export, which does not look beautiful. To adjust the size of each cell, you need to manually perform one row of operations, to avoid this problem, you can set the cross tabulation before export. On the cross tabulation expert interface, select the custom style tab and deselect the show cell margins option. Compare the settings of Excel before and after export: To enable Display Cell margin, to cancel Display Cell margin
In this case, we still cannot achieve the desired effect, so we can further set it and click format grid lines on the custom style tab ], on the displayed page, cancel the "display gridlines" option, as shown in. After this setting, you can export the cross tabulation to the Excel document.
Export the crystal report to an Excel file format and make the export effect more ideal. You need to carefully design the Crystal Report, and sometimes you need to modify the preview repeatedly to achieve the target effect! In addition, remember that each field in the crystal report corresponds to the Excel cell, and the gap between the field and the field, the blank space of each section in the report will also be converted to the Excel cell. Therefore, to avoid unnecessary cells after export, make sure that the fields and fields are fully aligned during design, and the edges overlap. The height of each section in the report must adapt to the object height.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.