How to export a perfect Excel file in a crystal report

Source: Internet
Author: User

Existing report items generally require that reports be exported to excel.
Although the Excel export function is provided for Crystal Reports, it is not easy to export a usable Excel table.
It is easy to see cross-row and cross-column situations. By default, there is no grid line for export. After you manually add the grid line (or select the grid line for export) to the grid line, it will look ugly.
The most important thing is that it cannot be used directly, which makes it inconvenient to reprocess the report.

For a long time, I have always thought so, but in fact, this can be achieved. (Thank you very much for IBM's Zhou Yong)

We generally use a grid-like display to add lines or lines to a large box. In fact, we only need to change the mode and implement it with the border of the field.
Let's take a look at the final result.

It must be noted that when this table is exported,"Display gridlines" is not selected

The above method can also be used to export data in infoview/Web mode.

I made an operation video, so here is a simple description.
Drag all fields to be used, right-click, format, and select border

Note that you do not select all four sides of the field. For example, in this example, for the header fields, the upper and lower left sides are used, and the rightmost field has multiple rightmost sides.
This is because the first field uses the left border of the last field as its right border.
Similarly, for fields in the detail section, use only the lower left side and add a right border to the rightmost side.
In this way, the bottom edge of each row in the detailed data section serves as the top edge of the next row. For the first row, it uses the bottom edge of the row on the header as its top edge.

This is a detour, but I am familiar with it several times.

20090506 update:
Using the above method, if the field is null or empty, a white block may appear with no border. You can solve the problem as follows:

If it is a struct Field

If {field} = ''or isnull (field) then
''
Else
{Field}

For numeric fields

If {field} = ''or isnull (field) then
0
Else
{Field}

Place this formula on the position of the original field and set the border.

The following are video files and templates (this article includes a conditional effect for changing the background color to solve the problem of another netizen, which is not necessary)
Http://files.cnblogs.com/babyt/CR2008040401.rar
Decompression password: babyt

Since many of the comments in this article have been separated from the topic, the Comment permission of this article is disabled.

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.