I am struggling with exporting a Crystal Report to a Word document.
I'm creating the report with this code:
using (ReportDocument initRep = report.SetUpReportDocument(rep, loadId))
{
string filePath = @"C:\word2Pdf\";
string fileName = Guid.NewGuid().ToString() + "wordReport.doc";
var fileNameAndPath = filePath + fileName;
initRep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, fileNameAndPath);
}
The problem is located here, on this line of code:
initRep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, fileNameAndPath);
This is taking forever, with no any error.
My report has 4 subreports, which are linked to the main report with unique Id (loadId).
I have been researching a lot here or even here and ...
When I am checking this using SQL Server Profiler, I find that the query is not pausing and it seems query running in screaming loop. I really need this to export, SOS.