Showing posts with label viewer. Show all posts
Showing posts with label viewer. Show all posts

Thursday, March 29, 2012

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

privatevoid Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = newDataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= newNetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

privatevoid Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = newDataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= newNetworkCredential(properties.Username, properties.Password, properties.Domain);

Credentials in Reporting Services?

I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

Is it possible?

Any help will be appreciated!!!

TIA

YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

prefix:datasourcename=value

as the prefix is dsu (for user) or dsp (for password)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks for your reply Jens!!!

But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

|||Hi,
Hope this could help you

System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

reportViewer.ShowCredentialPrompts = false;
reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
reportViewer.PromptAreaCollapsed = false;
reportViewer.RefreshReport();

|||

I am trying to use the example code provided for a simialr problem but the line (in VB)

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

always shows as read only. How do I get round this please?

|||Hi ,
I think your using report viewer web control ofr asp.net. I had same problem.
Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


But i hope this link could help you..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

If you found the way please post back here.


Thanks & Best Regards|||

I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

I tried the following suggestion:

reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

CredentialCache cc = new CredentialCache();

cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

reportViewer1.ShowCredentialPrompts = false;

reportViewer1.RefreshReport();

...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

ReportingService rService = new ReportingService();

rService.Credentials

= new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

CatalogItem[] catalogItems;

catalogItems = rService.ListChildren("/", true);

Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

|||

Hi Glenn,

You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

|||

You can refer following link.

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

|||

Hi, you can try this, might help.

I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

network login user, I am using my application's user id and password to connect to datasource.

By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

It works for me.

private void Form1_Load(object sender, EventArgs e)

{

.............................

Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

myCredential.UserId = "myuserid";

myCredential.Password = "mypassword";

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

DataSourceCredentials[] myCredentials=null;

if (reportdatasourcecollection.Count > 0)

{

myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

}

for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

{

ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

myCredential.Name = datasourceinfo.Name;

myCredentials[iIndex] = myCredential;

}

this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

...............................

}

|||

Hi,

I am facing the same problem.

I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

So what should be the Connection Methods in Shared DataSource?

Nilesh

|||

Me too there's an error here.

ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

any thoughts please?

thanks.

|||

Ishwar,

Thanks for the link. That is awesome. I got it working using the following code.

ServerReport.ReportServerCredentials.NetworkCredentials

= new NetworkCredential(properties.Username, properties.Password, properties.Domain);

Friday, February 24, 2012

Creating messages from SQL to the Windows Event Viewer app log

(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
something either somehow built-in with SQL 2000 or using VBscript.)
Anyone know of a way to create a test message somehow through MS SQL so that
it shows in the Windows application event log?
For example, would creating a job to run a dummy stored procedure create an
entry in the app event log?
(Problem is that when SQL is clustered, it uses a different 'source' name in
the event viewer. The 'source' name can't be different when writing a
simple script from what I can tell. I need to be able to easily create test
messages using the SQL cluster name.)
MarcoMarco Shaw wrote:
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
> Marco
>
>
Have you looked at RAISERROR?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||RAISERROR( 'This is a test event message', 10, 1 ) WITH LOG
--
Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gb
l...
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
>
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
>
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
>
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
>
> Marco
>
>
>

Creating messages from SQL to the Windows Event Viewer app log

(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
something either somehow built-in with SQL 2000 or using VBscript.)
Anyone know of a way to create a test message somehow through MS SQL so that
it shows in the Windows application event log?
For example, would creating a job to run a dummy stored procedure create an
entry in the app event log?
(Problem is that when SQL is clustered, it uses a different 'source' name in
the event viewer. The 'source' name can't be different when writing a
simple script from what I can tell. I need to be able to easily create test
messages using the SQL cluster name.)
MarcoMarco Shaw wrote:
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
> something either somehow built-in with SQL 2000 or using VBscript.)
> Anyone know of a way to create a test message somehow through MS SQL so that
> it shows in the Windows application event log?
> For example, would creating a job to run a dummy stored procedure create an
> entry in the app event log?
> (Problem is that when SQL is clustered, it uses a different 'source' name in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create test
> messages using the SQL cluster name.)
> Marco
>
>
Have you looked at RAISERROR?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||This is a multi-part message in MIME format.
--=_NextPart_000_06FD_01C6A732.93A36440
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RAISERROR( 'This is a test event message', 10, 1 ) WITH LOG
-- Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message =news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gbl...
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. =I need
> something either somehow built-in with SQL 2000 or using VBscript.)
> > Anyone know of a way to create a test message somehow through MS SQL =so that
> it shows in the Windows application event log?
> > For example, would creating a job to run a dummy stored procedure =create an
> entry in the app event log?
> > (Problem is that when SQL is clustered, it uses a different 'source' =name in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily =create test
> messages using the SQL cluster name.)
> > Marco
> > >
--=_NextPart_000_06FD_01C6A732.93A36440
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

RAISERROR( 'This is a test =event message', 10, 1 ) WITH LOG
-- Arnie Rowland"To be =successful, your heart must accompany your knowledge."
"Marco Shaw" =wrote in message news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gbl...> =(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need> something either somehow built-in with SQL 2000 or using VBscript.)> > Anyone know of a way to create a test =message somehow through MS SQL so that> it shows in the Windows =application event log?> > For example, would creating a job to run a dummy =stored procedure create an> entry in the app event log?> > =(Problem is that when SQL is clustered, it uses a different 'source' =name in> the event viewer. The 'source' name can't be different =when writing a> simple script from what I can tell. I need to be =able to easily create test> messages using the SQL cluster name.)> => Marco> > >

--=_NextPart_000_06FD_01C6A732.93A36440--

Friday, February 17, 2012

Creating Dyanmic Reports

Hi,
Iam Using Sql reporting services 2000, I am running a report using a report viewer in a .aspx page every thing works fine except the print button, is is not displayed in the report viewer toolbar. any reason why is behaving so? Another main Issue is I want to create reports dynamically i.e. I'll will only one .rdl file(physical file) in which I want to display employee information, customers info or orders info from the respective table as per the users request. like if he wants to see emp info he'll click a button to load the emp records in the report and vice versa. First I want to know is it possible to do so if yes how can I achive this.
feel free to ask any doubts if you dont understand the scenerio.
Regrads
Adonis

Youcould do it dynamically but strongly suggest against such a design especially for three entities that are some far from each other such as employees, orders and customers. I cannot see a useful purpose.|||ADONIS -
Yes you can do!
But be aware as with any application developed "security" is number 1 -
So if you have a couple of "layers" that ensure authentication of the user - then "go for it" as well as ensuring there is some sort of encryption "over" the fields you do not want anyone to see! And since you are already writing ASP.NET there are a couple of hundred routines that will encrypt you data prior to the write and unencrypt after the select
Also, for your printing problem have you installed SP2 of MSRS?
SP2 of MSRS provides for intranet "wide" printing!
Best Regards
|||Hi,
Thanks for the timely reply, it is very helpfull for me. But you dint mention how do I do itdynamically?
please let me know in detail the procedure for doing itdynamically.
Regards
Adonis