Crystal Reports: how do i export a table to excel data and insert line breaks without getting everything on one horizontal line? - crystal-reports

i'm new to CR. i have a report basically consisting of 2 tables of data(data comes from several subreports, not crosstab) and whenever i export to excel data it all comes out under 1 line, the entire report.
i've tried adding adding Chr(10)/Chr(13)/Chrw(10)/Chrw(13) at the beginning of each line, together with the data as well as a separated formula but only get an empty cell, instead of a new line.
if i separate the data in different sections, i'd lose the "table" look as i cannot extend lines&boxes over the section length.
i'm out of ideas at this point. anybody?

Option 1: get the data into a single data set. For example, use a Command/View/SP with a UNION ALL in the SQL.
Option 2: at least one of the 3rd-party Crystal Reports tools listed here allows you to automate the process of exporting one report to Excel and append the Excel export of a 2nd report to the same Excel workbook and worksheet.

Related

hiding blank columns in crystal reports while exporting to excel

I have a crystal report having 5 columns and when I am exporting it to excel I am getting some blank columns .
So I want to remove the column when there is no data while exporting.
Could any one please help how to do this
In many cases, you can avoid blank columns by ensuring there is no horizontal space between report objects. You can add vertical guidelines and snap objects to these guidelines to facilitate avoiding spaces.
But for some scenarios, such as reports that also include CrossTabs or parameter-driven optional columns, the problem can't be avoided even with 'Excel (Data Only)' export format.
A few 3rd-party Crystal Reports automation tools can delete blank columns and blank rows as part of the Excel export process. Ken Hamady maintains a list of 3rd-party Crystal Reports automation tools here.

How may I create a table autofilter on a Jasper .xlsx report output - one autofilter per sheet?

I am creating a Jasper report via Jaspersoft Studio 6
I am using the following property to export my report into two separate Excel sheets (tabs): net.sf.jasperreports.export.xls.break.after.row
My report consists of two tables, one table per sheet. So far, I have no issue creating this report.
However, I would also like to implement an excel auto filter on each table header using the following property: net.sf.jasperreports.export.xls.auto.filter
I added the auto filter property to both table headers, with a start and end on both. But when I run the report, the filter only displays on my last table (the one on the second sheet). I imagine this may happen because in Excel, you are only allowed one autofilter per sheet.
How may I put an autofilter on BOTH tables of a jaspersoft .xlsx report output?

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.

Formatting Excel Output of Crystal Reports with Multiple Subqueries

I've put together a summary report in Crystal Reports 2013 that has about 10-12 subreports. Each subreport is a fairly basic query that produces one or several lines rows and columns of data. I'm using SAP's Central Management Console to produce the reports, with the output an Excel output.
My problem is that my excel output is coming out unstandardized i.e. random extra empty rows and columns, data and header mismatches, different widths of rows and columns, etc.
I've been messing around with the formatting setting w/in Crystal Reports (standardizing size and shape of subqueries on the preview screen, supressing empty areas, etc.) but can't come close to getting the Excel output to look the way I want.
Is there a specific export formatting function/area within Crystal Reports that will allow me to design the export in the way I'd like? And if not, are there any ways to format multiple subqueries w/in Crystal Reports so their format in an Excel export is uniform?
If i really understood your issue, you have troubles with the alignment of data, cells and stuff like that in the spreadsheet, is it correct?
If so, the solution is to review the align of your fields in the report. It is very boring. You can use some functionalitis like:
right click a field and use "align to grid"
select two fields, right click and use "left align" and "top align"
change the property "gridsize" of the "report" to a higher value and use the keyboard to position the fields.
Avoid empty spaces between field at most.
Keep your eyes on the rulers.
Furthermore, check the version of Crystal Reports you are using. There is a good improvement about it from version 11 to 13.
Exporting to Excel seems a bit qwerky because the same steps do not necessarily work for all reports (my experience at least). Keep this in mind when reading the following steps. Perform the following steps on both the detail(footer if using grouping) and header rows where applicable:
Choose driver “Microsoft Excel(97-2003)”
Make sure the header and detail sections have no spaces in between the columns
Make sure the header and detail column boxes align perfectly (should see red crosses when alignment is correct).
Select all fields on the row, right-click, align to top (if this does try aligning to grid)
Right-click to the left of the detail columns and “Select All Section Objects”
Right-click in the same location and choose “Arrange Lines” then “Fit Section”
Perform steps 4 & 5 on the header columns as well
Open Section Expert, select “Suppress Blank Section” for all unused sections
If none of the above work, use driver “Microsoft Excel (97-2003) (Data Only) “
Headers will still appear in the report but will not be in bold

Excel Export Fail when Number of rows in the Excel sheet exceeded the limit of 65536 rows ssrs

In SSRS 2008 (I use Sql Server BIDS to create reports) how to solve "Excel Export Fail when Number of rows in the Excel sheet exceeded the limit of 65536 rows ssrs" issue
Thanks
Yes, this is a limitation of SSRS through 2008R2.
SSRS 2012, included with SQL server 2012 will remove this limit:
http://blogs.msdn.com/b/farukcelik/archive/2012/02/01/sql-server-reporting-services-ssrs-reporting-services-in-sql-server-2012-codename-quot-denali-quot-will-support-xlsx-docx-formats-bye-bye-65536-rows-limit-in-xls-files.aspx
The workaround for 2008R2 and before is to export as .csv
When your results are exceeding 65k rows (and you dont have SSRS2012), create a parent group on the tablix (or table, or list) and in the Group on: field enter the expression below.
Add Page break between each instance of a group
=CInt(Ceiling(RowNumber(nothing)/65000))
I think some Excel Versions can not support more then 65536 rows per se. You might consider to expand the data on several worksheets / tables.
A similar Issue is discussed here:
Is it possible to see more than 65536 rows in Excel 2007?
If your report is simple enough you can export as CSV, then import into Excel.
Export that data to csv file first.
then open a new Excel 2010 blank workbook.
Click file and open the exported csv file.
it will give you a Text Import Wizard prompt.
Continue clicking Next and then Finish.
If there is data that you need to keep as text ensure that in Step 3 of 3 you click Text for each column that you want to keep leading zeros if any.