Exporting a Crystal Report into an Excel File
After designing and finishing the report, everything may look nice and cool.
But what if the report needs to be exported to another format, say Excel.
I've tried this out, clicked on the Export Icon located at the toolbar of the
Crystal Report Viewer and saved it to an Excel file.
It works fine right? Yes, but once you open the file, you'd notice something
strange - either the columns used contains gaps or just not as what you've
expected it to be. Or certain lines are not supposed to be in that row or
column.
So, how to solve this problem is the way we've designed the report; upon
designing, think of the report as an excel file without a grid (but to make it
easier, you could format the grid to be visible and you could easily align
your report fields).
Designing the report in a way wherein we have to be precise in aligning each
field within the header, detail and footer; or even within groups.
An example is when you have a long header and 2 short details, what you should
do is to align the 2 detail fields within the header:
:----- Header -----:
:-Detail-: :-Detail-:
In this way, this will occupy the columns A & B within the excel sheet.
This is only one of the ways on how to export the Crystal Report into an excel
sheet. I'll be adding the other ways on my next coming parts.
But what if the report needs to be exported to another format, say Excel.
I've tried this out, clicked on the Export Icon located at the toolbar of the
Crystal Report Viewer and saved it to an Excel file.
It works fine right? Yes, but once you open the file, you'd notice something
strange - either the columns used contains gaps or just not as what you've
expected it to be. Or certain lines are not supposed to be in that row or
column.
So, how to solve this problem is the way we've designed the report; upon
designing, think of the report as an excel file without a grid (but to make it
easier, you could format the grid to be visible and you could easily align
your report fields).
Designing the report in a way wherein we have to be precise in aligning each
field within the header, detail and footer; or even within groups.
An example is when you have a long header and 2 short details, what you should
do is to align the 2 detail fields within the header:
:----- Header -----:
:-Detail-: :-Detail-:
In this way, this will occupy the columns A & B within the excel sheet.
This is only one of the ways on how to export the Crystal Report into an excel
sheet. I'll be adding the other ways on my next coming parts.
Labels: Crystal Reports

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home