Hi,

I want to export crystal report fom ASP .Net in word format. I am able to export crystal report but it dosen't give be the Word toolbar as we can see in the when Msword document is opened.

oStream = DirectCast(Me.reportdocoument.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.WordForWindows), MemoryStream)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/msword"
Response.BinaryWrite(oStream.ToArray())
Response.[End]()

where reportdocoument is the crystal report document.

When we will execute this code it will ask 2 options to save or to open the word document. If you select the open word document then it will show the word document but no word toolbar as we can see in Msword. If we want to print this document then we can not print.

Please Help.

Reply from the earliest is really appreciated.

With Regards,
Virendra

Hi Veeru,

U can use Ctrl+P for print Dialog.

Thanks
Hari

Hi,

I want to export crystal report fom ASP .Net in word format. I am able to export crystal report but it dosen't give be the Word toolbar as we can see in the when Msword document is opened.

oStream = DirectCast(Me.reportdocoument.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.WordForWindows), MemoryStream)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/msword"
Response.BinaryWrite(oStream.ToArray())
Response.[End]()

where reportdocoument is the crystal report document.

When we will execute this code it will ask 2 options to save or to open the word document. If you select the open word document then it will show the word document but no word toolbar as we can see in Msword. If we want to print this document then we can not print.

Please Help.

Reply from the earliest is really appreciated.

With Regards,
Virendra

Hi,

Try this code :

Crs.ReportDocument.ExportToDisk(ExportFormatType.WordForWindows, yourReport)

Crs is your ReportSourceID. That is located in CrystalReportViewer control.

Thanks,

Kusno.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.