Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Reporting Services 2005 101 with a Smart Client


Reporting Services 2005 101 with a Smart Client

Author
Message
Biz
Biz
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 Visits: 300

Hi Asif,

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

any idea,

Bis


Stacy Parrish
Stacy Parrish
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
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();

}

}


Asif Sayed
Asif Sayed
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 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


Stacy Parrish
Stacy Parrish
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
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


Asif Sayed
Asif Sayed
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 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


Asif Sayed
Asif Sayed
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 3

Stacy,

Please make sure the reportviewer1.ProcessingMode = Local

This should resolve the issue.

Regards,

Asif


sqlpro
sqlpro
Old Hand
Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)Old Hand (387 reputation)

Group: General Forum Members
Points: 387 Visits: 143
i found them finally
they are under "Report" menu and not on right click !




Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search