oRDoc.Load(strCrystalReportFilePath); //loads the crystalreports in to the memory
oRDoc.RecordSelectionFormula = ReportParameters.sSelectionFormula; //used if u want pass the query to u r crystal form
oDfDopt.DiskFileName = strPdfFileDestinationPath; //path of file where u want to locate ur PDF
expo = oRDoc.ExportOptions;
expo.ExportDestinationType = ExportDestinationType.DiskFile;
expo.ExportFormatType = ExportFormatType.PortableDocFormat;
expo.DestinationOptions = oDfDopt;
oRDoc.SetDatabaseLogon(Connect.sDatabaseUserName, Connect.sDatabasePassword); //login for your DataBase
oRDoc.Load(strCrystalReportFilePath, OpenReportMethod.OpenReportByDefault);
oRDoc.Export();
}
arunpandian
Member
5 Points
10 Posts
Export RDLC report to word document
Mar 02, 2012 03:41 AM|LINK
Hi friends,
how to export RDLC report to word document.?
By
Arun
Mahesh Darku...
Participant
896 Points
238 Posts
Re: Export RDLC report to word document
Mar 02, 2012 05:07 AM|LINK
void Transfer()
{
strCrystalReportFilePath = Server.MapPath("" + ReportParameters.sReportFileName + ".rpt");
strPdfFileDestinationPath = Server.MapPath("~\\temp\\" + "Test" + Session["UserName"] + ".pdf" + "");
oRDoc.Load(strCrystalReportFilePath); //loads the crystalreports in to the memory
oRDoc.RecordSelectionFormula = ReportParameters.sSelectionFormula; //used if u want pass the query to u r crystal form
oDfDopt.DiskFileName = strPdfFileDestinationPath; //path of file where u want to locate ur PDF
expo = oRDoc.ExportOptions;
expo.ExportDestinationType = ExportDestinationType.DiskFile;
expo.ExportFormatType = ExportFormatType.PortableDocFormat;
expo.DestinationOptions = oDfDopt;
oRDoc.SetDatabaseLogon(Connect.sDatabaseUserName, Connect.sDatabasePassword); //login for your DataBase
oRDoc.Load(strCrystalReportFilePath, OpenReportMethod.OpenReportByDefault);
oRDoc.Export();
}
arunpandian
Member
5 Points
10 Posts
Re: Export RDLC report to word document
Mar 02, 2012 06:06 AM|LINK
HI Mahesh
i'm using RDLC report.not CrystalReport.
By
Arun
Richey
Contributor
3816 Points
431 Posts
Re: Export RDLC report to word document
Mar 07, 2012 09:28 AM|LINK
Hi,
You can refer to the below link.
http://forums.asp.net/p/1404388/3051031.aspx