Problem in crystalreport viewer


P

Pattabi

Hi!!!!!!!!!!
I am developing .net project without using visual studio.net
environment.
I have created a report in crystal reports 9.0.
I have written my code in c# to export and open the report. My
export is done perfectly where as my crystal report viewer part, gives
me the following error

CrystalReportViewer - crystalReportViewer1
Use the ReportSource or DataBindings property to specify a report
source.

Can anyone please help me in this, I will be really helpful for me

Thanks in advance

Regards
Dharani
 
Ad

Advertisements

J

Jon Paugh

Based on the error(you have not provided any code), you
are not telling the Crystal Report viewer which report to
show.

You need to do something like:
CrystalReportViewer1.ReportSource = rpt;
where rpt is your typed report object (an instance of the
class associated with the report you create.)
 
D

Dharani Ravindran

Hi,
Thanks for your reply.

yes i have used the same code as u told. here is my code

crystalReportViewer1.Visible = true;
crystalReportViewer1.ReportSource = crReportDocument;

I am want to remind that i am not using .net IDE. just doing everything
manually. please help further

thanks
dharani
 
Ad

Advertisements

E

Elvin Ng

Hi,

You need to create a report document and populate it with which rpt and
connection info:

crReportDoc = new ReportDocument();

crReportDoc.Load(path + "\\" + rptName);

cfCrystalReportsUtility.ReportDocumentSetLocation(crReportDoc,
ConnString);// Connection info

:

Do your other stuffs like param, record selection formula

:

CRViewer.ReportSource = crReportDoc;



elvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top