Can we export data of reports into other format like in
world doc etc?

Answer Posted / kamalakannan.a

Sure.We can save the crystal report as many formats.There
are .Doc,,xsl,.pdf and etc.

The sample code i used in my project is given below.

case "pdf":
{
//setting disk file name

crDiskFileDestinationOptions.DiskFileName =
ExportPath + filename;
//setting destination type in our case
disk file

crExportOptions.DestinationOptions =
crDiskFileDestinationOptions;
//setting export format type

crExportOptions.ExportDestinationType =
ExportDestinationType.DiskFile;
//setting previously defined
destination opions to our input report document

crExportOptions.ExportFormatType =
ExportFormatType.PortableDocFormat;
break;
}

case "xls":
{
//setting disk file name

crDiskFileDestinationOptions.DiskFileName =
ExportPath + filename;
//setting destination type in our case
disk file

crExportOptions.ExportDestinationType =
ExportDestinationType.DiskFile;
//setting export format type

crExportOptions.ExportFormatType =
ExportFormatType.Excel;
//setting previously defined
destination opions to our input report document

crExportOptions.DestinationOptions =
crDiskFileDestinationOptions;
break;
}


Kamal...

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If we create reports in Crystal Reports using the UCAR Data Warehouse database, which tables should be used?

2266


Explain reporter footer contents are move depend the page footer values?

630


Where can we find the log file generated when we run a crystal report?

695


Explain basic steps required to display a simple report in crystal?

656


Why do we use crystal reports when we have reporting tools in bo itself?

709






How can we improve the performance of a crystal report?

685


What are field expressions and what are the diff types? (I looked this up in the internet and never found anything with regards to types of field expressions)?

676


hi... i've two crystal reports one is in D: drive name employee.rpt with 5 textobject and another report is in E: drive name employee.rpt with 15 textobject... now i want to write a program to overwrite the D drives report with E drives reports i.e i want to replace the 5 textobject with 15 textobject.. overwriting the reports while it is executing .. is there any code for it please help me.. its urgent..

2688


Kindly Help for this Below Scenario, I am going to implement Power BI into our internal software. I’m familiar with the fact that each user can pay $9.99 a month to build and view reports but what I need to know is how can we embed Power BI into our application so that any users that log into our application can see the reports without the monthly fee. I’ve researched enough that it can be done. What I am not familiar with is how to do it or the pricing of embedding it into an application. I think they do pricing on how many renders you do or something. Would you be able to look into how we could embed it into our software and the cost?

1387


Explain the various components in crystal reports?

767


How the data expert of flash object(after inserting flash object_right click-data expert) is useful in crt?

1314


Where is the image located, after youve placed it on the report?

669


How to access crystal reports in .net?

689


hi ... i've created one crystal report in windows form and one crystalreportviewer .. the following is my code.. in form1.cs file try { ExportOptions CrExportOptions; DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions(); PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions(); CrDiskFileDestinationOptions.DiskFileName = "c:\\csharp.net- informations.pdf"; CrExportOptions = cryRpt.ExportOptions; { CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile; CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat; CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions; CrExportOptions.FormatOptions = CrFormatTypeOptions; } cryRpt.Export(); } the above code is saving the file into pdf into specified path.. but i dont want to save a file i should get direct print preview and have a option to print .. As we do in web application using crystal report viewer clicking print and report will be opened in pdf.. and the click print.. i want the same function as we do in web application... i'm writing code in c#.net hope the above explaination will be understood clearly..

3212


how can we convert crystal dictionary dc5 file to another datasource format like mdb or xml schema

2671