How to output 2 excel files from a single crystal report rpt file - crystal-reports

The requirement is that for a given set of date parameters I want to to output a premium and a tax excel separately. Currently i have 2 separate rpt files to generate the premium file and tax file. I am thinking to merge both of them and run 1 report only as the data between both files is linked by transaction id.Please advise if that is possible.
Note - I only use Crystal Report V14.0.4 to create the rpt file and don't have the .net assembly to do it through programming.

Not possible with Crystal Designer alone.

Related

Crystal Reports: export datasource with report definition

I am stepping into a new reporting environment and I don't have a lot of background info yet. But my company utilizes a series of crystal reports.
I want to compare two reports that are identical except that they connect to different data sources. I can click on both reports in the Crystal Reports viewer, go to Database > Set Database Location and I am able to see the data source. If I do this for both reports in question, I can see that they both connect to different data sources, as expected.
However, when I export the two Crystal Reports as text files and then compare them using Notepad++, I don't see the datasource / connection string in the report files, so when I do a compare, they are exactly the same.
If the exported text files are exactly the same, how does Crystal Reports Viewer know to point one report towards a prod data source and another report towards the dev data source? It does not appear to be embedded in the exported metadata / report definition file.
Thank you!!
The connection info is simply not part of the exported report definition text.
But, obviously, it is part of the report definition.
If you need to export more detailed report definition information, including connection properties, consider getting a documentation utility. Ken Hamady maintains a list of those here.

Crystal Reports 2013: Conditional rendering based on export format

I am developing a report in Crystal Reports 2013 to publish to a Business Objects server. The user wants it to be able to run to HTML, PDF, Excel, or CSV. If I make it compatible with CSV (a raw data dump with one row per record -- for use downstream by a machine) it will be too wide to fit on one page for the PDF output. We have no direct control of the Business Objects server. This is all done through the cloud application.
...and I'm new to Crystal Reports...
Is there a way to create two sections in the report -- one for CSV and one for PDF -- and have one render (or hide) when the report is run to Excel or CSV and the other render (or hide) when the report is run to HTML or PDF? How?
No, but you can create a parameter that prompts the user for desired layout ("For PDF", "For CSV") and use that parameter in the dynamic expression for section suppress attribute.
Assuming they don't, you can always go to plan B and simply create 2 different reports.

Create crystal report using dataset without using xsd file

I would like to ask if it is possible to create a crystal report using a dataset without using or creating an xsd file. Because there's one report here that does that. It is connected to a dataset but there's no xsd file that is used.
Of course you can, just use the report document's SetDataSource method :
YourReportDocument.SetDataSource(YourDS);

Reporting Service: Change reports based on format

I have a report that will be viewed from SSRS report manager and scheduled to send a flat file as well. The problem is that the rich display, summation rows, and some other elements that are perferred when viewing the report online or as a PDF are not wanted when the report is viewed in Excel or when it is exported to CVS. The solution I proposed was to simply have two reports. One that was nicely formated and the other that was more of a raw data feed but they want only one report meaning that I need a way to show one thing if it is viewd online or saved to a PDF and something different when it is saved to CVS or XLS. Is this possible and if so how?
When exporting to .csv format, many fields are stripped. Have you looked at what the existing functionality does to your report?
If that's not adequate, you can use the new SSRS 2008R2 global variable to change item visibility. For example set the hidden function to:
=(Globals!RenderFormat.Name = "EXCEL")
This would hide something when exported to Excel format. (This is only available since SSRS 2008 R2.)
More info on this at:
http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/globals-renderformat-aka-renderer-dependent-report-layout.aspx

Crystal Reports Excel export with worksheets

Is there a way to convince Crystal Reports to export a page / group / whatever to separate worksheets when exporting to Excel (Data Only)? I'm using the CR that came with VS2008 (version 10.5)
Thanks.
According to the documentation you cannot export a report directly to multiple worksheets in a single Excel workbook.
When the limit of 65536 rows in Excel is reached though, the exporter does create a new worksheet, but you are not in control :)
update
To create your own Excel merger:
PRE: Make sure you have the Office (Excel) SDK libraries installed.
PRE: Place the files that need to be merged in a single directory.
In a VS2008 solution:
Create a new empty Excel Workbook (variable: objNewWorkbook)
Loop through the files in the directory (where you placed the Excel files) and for each item:
Load the file as a Excel Workbook (variable: objWorkbookLoop)
Create a new Worksheet in objNewWorkbook (optionally: with the filename of objWorkbookLoop) (variable: objNewWorksheetLoop)
Copy the data from (probably sheet1 in) objWorkbookLoop to objNewWorksheetLoop
Finally save objNewWorkbook to a file.
One of the things everybody ignores is that excel automation is not an acceptable solution. Yes it works ( almost always) , but even Microsoft recommends to not use it for unattended execution : http://support.microsoft.com/kb/257757
The only safe way I know to export a crystal report to multiple worksheets is by creating a grouped report and burst it using R-Tag report manager. This tool is not using Excel automation so you can run your reports at any time and on the server but if you are currently using another software to run your reports you will need to switch to this one (it is not an extension).
I know this thread is an old one, but I can see links to it without a real answer. Hopefully this will help somebody.