number format changed while exporting from 2008 Crystal Report to excel .csv file - crystal-reports

From 2008 Crystal Report view, the number format reads as 580015704027 in which is correct.
When exporting data from .rpt to .csv, that number format changes to 5.80016E+11.
How do I make it stick so that it will be exported correctly while on automation?
Thank you,
Holly

Here is the solution.
This solution works if you are using a database field with number format.
Right click on the filed go to Format Field.
Move to tab Number.
select last option (1,123.0000)
Now export to .CSV format.

Related

Crystal Reports – Extra columns when exporting (Microsoft Excel (97-2003) format only)

When exporting a Crystal Report (2016) to excel format, I am getting extra columns in the report. This does not happen with any other export format. So empty data columns display in the first 30+ columns. How can I correct that?
This can get frustrating if the report is too complex, but if you design the report so that no fields overlap and there are no gaps between the fields, then the export should work better. However, if you have fields and objects in sections where the widths of things in one section differ from the width of things in another section, then you are going to get merged cells and empty cells in your export.
Sometimes its much easier to export the report using one of the (Data Only) Excel export options. This can help to force the export into single cells without merges and gaps, however, the exported spreadsheet will be unformatted and will require some manual formatting after the export when using this method.

Jasper Report Excel-CSV Export: Prevent executing excel formula

I am using Jasper Report API 4.5 (ready to update if required for this solution). With Jasper Report I am exporting report to HTML, Excel, CSV and PDF. A situation I came across is that if data is having valid excel formula then on exporting data to Excel and CSV and viewing file to MS Excel, it executes excel formula. This causes a security issue as some data is having excel formula to perform some action on local computer then it may harm system.
We can not validate data at the time of insertion, doing so may fix the problem. But currently there is no data validation as such to prevent inserting excel formula. Preferred solution to me is to manage from Jasper Report.
My question is, is there any mechanism or export parameter which can prevent excel formula to be executed? Or is there any way to print data as is and ignore excel formula?
For Excel export:
We can use Apache POI or SmartXLS API to set cell type to Text externally in order to get same result from database.
For Apache POI, we can set cell format type as "#", here is the link from Apache POI javadoc.
For SmartXLS, we can set workbook range style to set format type as Text, code snippet for it would be like below:
RangeStyle rangeStyle = workBook.getRangeStyle(1, 0, 50, 0);
rangeStyle.setCustomFormat("#");
For CSV Export:
Upgraded JasperReport 6.3. There is a feature to add enclosure to csv field. By default excel have single quote (') as field enclosure, so that may execute the field as formula. To avoid that we can set enclosure field to (`).
SimpleCsvExporterConfiguration reportExportConf = new SimpleCsvExporterConfiguration();
reportExportConf.setFieldEnclosure("`");
reportExportConf.setForceFieldEnclosure(true);

How to output the excel with filters enabled on columns in crystal reports

I have a crystal report where I need to mail the users the data in the excel as an attachment but with the condition that filters are enabled in each columns of the excel report .
If I have 10 columns in excel , user doesn't want to apply filter explicitly rather they want the filter already present so that they can filter based on any column .
If there is another better way of filtering the data on user side please suggest that too.
There is no way to do this from within Crystal reports. You can write an application, which will export the report to Excel, open the Excel file and add a filter.
There is a free version of R-Tag, which supports this feature. You can see it demonstrated here: http://www.r-tag.com/Pages/Preview_RTagAndBOE.aspx
Use the menu to jump to "Advanced report extensions" or go to position 5:26
If this works for you, here is the link to the free edition:
http://www.r-tag.com/Pages/CommunityEdition.aspx

Why in some WebI reports Exporting Excel not happening

I have 5 Webi reports and all these reports works fine. Out of the 5 reports , 3 reports i could export to available mode. But the other 2 reports too i can export to pdf or excel or excel 2007. Here come the problem. When i export to excel or excel 2007, i do not get the exact structure of the report, like the table and the values. What i get is complete blank with Report Tab name.
Have anyone gone through this kind of problem? If so please help me if i went wrong for this 2 reports alone.
Thanks
Niki.
First select the Table and Check in Vertical Table setting and if you see any Blank variable added into report, please delete.
So that report will extract without any error.
You can set preferences if you want to optimise export to Excel to preserve formatting or preserve data. Try configuring your preferences to preserve data or preserve formatting when exporting to excel and experiment.
Exporting to excel can be tedious, your webi report needs to be optimised to properly export to excel and preserve formatting and data

Is there a way to export Crystal reports formulas to a readable document?

I have a very complicated Crystal Reports XI rpt file with 30+ group header sections,
each with its own suppress (No Drill-Down) formula. I would like to document this report
in a separate ASCII txt file so I can get an overview of the report. Is there any tool or any way I can export Crystal Reports XI formulas without going through each section and copying them?
The export functionality provides an export format called "Report Definition" which will export the complete definition, including all formulas, to a text file.
RptToXml is an open-source project with that goal in mind.