Asked By
jonn timson
20 points
N/A
Posted on - 01/23/2013
Hi guys,
How to perform crystal report import from word? There are some times that we needed crystal reports, how can be crystal reports properly imported from a Microsoft word document? Share with me your ideas regarding this issue, a step by step process is highly needed.
Expecting some help, thank you.
How to perform crystal report import from word?
Follow the instructions below to import an MS Word file into a Crystal Report:
1) Make a new Crystal report.
2) From the Insert menu, click OLE object.
3) Click Create from file.
4) Click Browse and open the Word document.
5) Put the OLE object in the section where you want to see it.
How to perform crystal report import from word?
Hi Jonn,
Alternatively you can also export your crystal report into a Microsoft document. There are basically two ways to do that. One is to do it manually and another is to do it automatically which would need some programming skills of the VB language in crystal report. Following is the code that you can try for automatic export of your CR.
 ReportDocument cryRpt = new ReportDocument();
           cryRpt.Load(@"CrystalReport1.rpt");//please change location of the crystal report fileÂ
           Â
           try
           {
               ExportOptions CrExportOptions;
               DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
               PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
               CrDiskFileDestinationOptions.DiskFileName = "c:\crystal.doc";
               CrExportOptions = cryRpt.ExportOptions;
               {
                   CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                   CrExportOptions.ExportFormatType = ExportFormatType.WordForWindows;
                   CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
                   CrExportOptions.FormatOptions = CrFormatTypeOptions;
               }
               cryRpt.Export();
           }
           catch (Exception ex)
           {
             //Console.WriteLine(ex.ToString());
You can also export it manually. For exporting just go to File->Export and then choose an MS word from the drop down box.
Hope it helps.
Thanks
Baker