Click here to Skip to main content
16,021,430 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem whlie exporting my report to WORD document, the application stops, there is no Word document

the code looks like this:

VB
oRPT.Load(Server.MapPath("hereisThePathofMYCRYSTAL.rpt"))
        ds = FillDataset() 'Here do I fill the dataset (successfuly)
        oRPT.SetDataSource(ds.Tables(0))

        CrystalReportViewer1.ReportSource = oRPT


        Dim formatType As ExportFormatType = ExportFormatType.NoFormat
        formatType = ExportFormatType.WordForWindows
        oRPT.ExportToHttpResponse(CrystalDecisions.[Shared].ExportFormatType.WordForWindows, Response, True, "")
Posted

1 solution

Hey Voley,
I am not a VB guy, I am a C# guy but I have found a solution for you.
here is link a complete guide for you to export Crystal report in VB.NET or C#.NET
http://www.aspsnippets.com/Articles/Export-Crystal-Report-on-Button-Click-to-Word-Excel-PDF-and-CSV-in-ASPNet.aspx[^]

Cheers,Enjoy Coding :)
 
Share this answer
 
Comments
Voley 9-Feb-15 6:18am    
Hey, Thnx for the link :)

I tried it, and I am gettin an error in the line: crystalReport.ExportToHttpResponse(formatType, Response, True, "Crystal") which says "Missing parameter values".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900