Link to home
Start Free TrialLog in
Avatar of pckben
pckbenFlag for Singapore

asked on

Using ReportViewer export report to pdf file

Hi, seems to be a simple question, but i searched through the ReportViewer class and did not find such Export() method or something like that. I am using VS2005, using the ReportViewer to display the .rdlc report.

Thanks.
pckben
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Hi pckben,

You need to use the ExportToDisk method of the ReportDocument object

Cheers!
Avatar of pckben

ASKER

Hi emoreau, thanks for your reply!

I think the problem is my project missing some references. But I can only found in my .NET reference list this two:
Microsoft.ReportViewer.Common
Microsoft.ReportViewer.WinForms (and the WebForm one)

Then I used Object Browser to search through it and could not find anything to use. Event your ExportToDisk and ReportDocument. Where did you find those?

I tried download and installed the ReportViewer package from Microsoft but seems it doesnt help.

(please take note i am using the rdlc with the ReportViewer, not the CrystalReportViewer one)

Anyone could show me the problem here please?

pckben.
The ReportDocument is part of CrystalDecisions.CrystalReports.Engine
Avatar of pckben

ASKER

oh so you are mentioning the CrystalReportViewer with the .rpt report arent you?

The problem is that, from the ReportViewer object (not the CrystalReportViewer one), i could only use reportviewerObject.LocalReport to link to the report object, but then it doesnt provide me any export method!

pckben
I am using the version of Crystal Reports that comes with VS 2005. The ReportDocument object is not part of the viewer.
Avatar of pckben

ASKER

hmm could you please show me how to link from my ReportViewer and LocalReport objects to that ReportDocument object so that i could use the Export function?
ASKER CERTIFIED SOLUTION
Avatar of EwaldL
EwaldL

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial