Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
i try to show ssrsc reports in asp.net web page using report viewer

code

C#
protected void Button1_Click(object sender, EventArgs e)
{

    ReportViewer2.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
    ReportViewer2.ServerReport.ReportServerUrl = new Uri("http://lenovo-pc/ReportServer");
    ReportViewer2.ServerReport.ReportPath = "/Report Project1/Report1";
    ReportViewer2.ServerReport.Refresh();
}

image
http://i.stack.imgur.com/DMChr.png[^]

where is the probelm... and why report not display?
Posted
Updated 2-Feb-14 3:07am
v2

 
Share this answer
 
Comments
Diya Ayesa 2-Feb-14 13:20pm    
now it shows me error "An error has occurred during report processing.

Cannot create a connection to data source 'DataSource1'"
JoCodes 2-Feb-14 13:23pm    
specify the SQL account credentials in the datasource
Diya Ayesa 2-Feb-14 13:41pm    
i specify but not work.... check this image ...http://i61.tinypic.com/1i0bgg.png
It seems that you'r having an issue with the SqlDataSource.
I may be wrong but see if you've provided proper user credentials to the connection string of you database,
 
Share this answer
 
Comments
Diya Ayesa 2-Feb-14 13:40pm    
please have a look this image ....http://i61.tinypic.com/1i0bgg.png
Krunal Rohit 2-Feb-14 13:44pm    
okay,
try the following connection string
data source=LENOVO-PC\SQLEXPRESS;Initial Catalog=DMSFYPP; User ID=username;Password=pswd

here the values of User ID and Password must be of your Database Engine's credentials.
Give it a try, if it's not working let me know.!
Diya Ayesa 2-Feb-14 13:52pm    
in my sql server 2008 r2 there is not a username and password my sql is in windows authentication mode
Krunal Rohit 2-Feb-14 13:53pm    
provide that in connection string.
Diya Ayesa 2-Feb-14 13:56pm    
in server name there is LENOVO-PC\SQLEXPRESS and i already provide this in connection string

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900