how can i display crystalreport in button click?

am working with VS2005



how can i display crystalreport in button click? am working with VS2005..

Answer / tanveer sidiq

Palce CrystalReportViewer Object on ur form and name it to
objCrystalReportViewer
drag a button on to the same name it to btnTemp
on btnTemp click write the following lines of code

dim rdReportToPrint as new
CrystalDecisions.CrystalReports.Engine.ReportDocument()
rdReportToPrint.Load("write the path were in u have save ur
report here" )

objCrystalReportViewer.ReportSource = rdReportToPrint;

this is the way we load crystalreport dynamically

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What statements can enclose a "continue" statement?

3 Answers   Fortech,


How long will it take to learn c#?

0 Answers  


What is the difference between // comments, /* */ comments and /// comments?

0 Answers  


If i have 100 objects in my application are out of scope.when first time garbage collected how many objects memory reference are free?

2 Answers   ITC Infotech,


Is inheritance possible in c sharp?

0 Answers  


What is jit (just in time)?

0 Answers  


if a method is marked as protected internal who can access it?

0 Answers   Siebel Systems,


How to assign default value to nullable types? Did nested nullable types are allowed

2 Answers   TCS,


How to Show Message box in Metro Style App?

0 Answers   PUCIT,


What is type class in c#?

0 Answers  


What is a hash table in c#?

0 Answers  


What is the difference between “dispose” and “finalize” variables in c#?

0 Answers  


Categories