Click here to Skip to main content
15,867,308 members
Articles / CrystalReports
Tip/Trick

Export Crystal Report to Excel - Some Tips

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
19 Aug 2014CPOL1 min read 14.5K   3   1
Tips for developing a Crystal report which will be exported to Excel

Introduction

Developing a Crystal report which will be exported into Excel is always tricky, time consuming and needs a lot of patience. There are a lot of blog posts, forum discussions, articles in the web about this matter. During the last couple of days, I was hanging with one of my reports and at last I've figured out some tricks about exporting Crystal report to Excel.

Some Tricks

  1. Do not use your mouse to resize/align your header/detail fields. Always depend on Properties pane. Make sure the height, width and left properties are always the same as that of the related header and detail fields.
  2. Top property of header/detail fields should always be 0.
  3. Do not use line object. It will create an extra Excel row after export.
  4. You can use (single) right and bottom border of detail field objects and only right border of header objects.
  5. May be the report which will export to Excel will not be presentable for clients. So create another presentable report for client which may have lines or borders or colors or whatever you want.
  6. After exporting into Excel - maybe your header or detail section will be created using more than one Excel rows. This may not be a problem. But you can decrease the height of detail/header fields to accommodate in single Excel row.
  7. Suppress (Drill Down) the report header, report footer, page header, page footer because they do not have value in Excel.
  8. In your data source, do not keep null data in any field. Atleast, fill data with empty string/something not valuable like dash (-).

May be these tricks will help you.

Happy coding!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Bangladesh Bangladesh
Nothing more...

.

Comments and Discussions

 
QuestionProperties pane? Pin
UnloadedGed16-Jun-15 6:51
UnloadedGed16-Jun-15 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.