how can i display crystalreport in button click?

am working with VS2005

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a new form in c#?

721


Is cli same as the clr?

697


What are scriptable objects?

707


What are the properties of c#?

696


Can mvc be used for desktop applications?

710


Difference between a sub and a function in c#.

747


Can you declare a field readonly?

722


What is a linked list c#?

699


What is serialization in c#?

668


How do you serialize in c#?

657


Can bool be null c#?

684


What is Implementation inheritance and interface inheritance?

708


Which is better python or c#?

651


How to get the sum of last 3 items in a list using lambda expressions?

720


What is the purpose of dependency injection?

704