Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Reporting Services 2005 101 with a Smart Client Expand / Collapse
Author
Message
Posted Thursday, September 7, 2006 7:27 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, August 31, 2014 10:45 PM
Points: 65, Visits: 300

Hi Asif,

I chaged my database name exactly same and it is showing the error again.

any idea,

Bis

Post #307129
Posted Tuesday, September 12, 2006 11:59 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 12, 2008 10:44 AM
Points: 376, Visits: 3

I have tried numerous times to resolve the error I am getting with this and put up my watch window and it says my reader object drReport is throwing an exception but the application runs and displays the report viewer with the message  "The source of the report definition has not been specified.  I am forwarding my code...any help appreciated.

 

private void Form1_Load(object sender, EventArgs e)

{

//use following if you use standard security

string cnString = @"Data Source= sparrishlpt2\stacy;Initial Catalog=northwind; Integrated Security=SSPI";

//declare Connection, command and other related objects

SqlConnection conReport = new SqlConnection(cnString);

SqlCommand cmdReport = new SqlCommand();

SqlDataReader drReport;

DataSet dsReport = new dsProduct();

try

{

//open connection

conReport.Open();

//prepare connection object to get the data through reader and populate into dataset

cmdReport.CommandType = CommandType.Text;

cmdReport.Connection = conReport;

cmdReport.CommandText = "Select TOP 5 * FROM Products Order By ProductName";

//read data from command object

drReport = cmdReport.ExecuteReader();

//new cool thing with ADO.NET... load data directly from reader to dataset

dsReport.Tables[0].Load(drReport);

//close reader and connection

drReport.Close();

conReport.Close();

//provide local report information to viewer

reportViewer1.LocalReport.ReportEmbeddedResource = "rsWin1.rptProductList.rdlc";

//prepare report data source

ReportDataSource rds = new ReportDataSource();

rds.Name = "dsProduct_dtProductList";

rds.Value = dsReport.Tables[0];

reportViewer1.LocalReport.DataSources.Add(rds);

//load report viewer

reportViewer1.RefreshReport();

}

catch (Exception ex)

{

//display generic error message back to user

MessageBox.Show(ex.Message);

}

finally

{

//check if connection is still open then attempt to close it

if (conReport.State == ConnectionState.Open)

{

conReport.Close();

}

}

Post #307991
Posted Tuesday, September 12, 2006 12:07 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 14, 2008 2:21 PM
Points: 18, Visits: 3

Hi Stacy,

Please make sure you have the correct project name specified, I hope it is "rsWin1"?

reportViewer1.LocalReport.ReportEmbeddedResource = "rsWin1.rptProductList.rdlc";

If you wish, you can zip the entire project and email it to me at:  asif.blog at gmail dot com.

Regards,

Asif

Post #307997
Posted Tuesday, September 12, 2006 1:02 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 12, 2008 10:44 AM
Points: 376, Visits: 3

Asif,

your email you reference is Asif.blog@gmail.com, correct?  I zipped the project and I am getting failure from the postmaster

My project name is rswin1, any other thoughts?

 

Stacy

Post #308002
Posted Tuesday, September 12, 2006 1:09 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 14, 2008 2:21 PM
Points: 18, Visits: 3

Thats strange! I am getting email regularly on gmail account, never got any complaint.  If you are sending through Gmail then make sure to change the file extension from .ZIP to anything else as Gmail will not let you attache ZIP file, which has any executables in side. Or try sending me at asif_to@yahoo.com

Regards,

Asif

Post #308004
Posted Wednesday, September 13, 2006 1:31 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 14, 2008 2:21 PM
Points: 18, Visits: 3

Stacy,

Please make sure the reportviewer1.ProcessingMode = Local

This should resolve the issue.

Regards,

Asif

Post #308348
Posted Wednesday, September 13, 2006 2:45 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, October 9, 2014 9:55 PM
Points: 360, Visits: 103
i found them finally
they are under "Report" menu and not on right click !



Post #308375
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse