Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Friday, March 23, 2012

Re-set identity field

Hi:

I created a small SQL Express database/ASP.net/C# application and in the learning process. Before I implement it I would like to re-set autonumber / identity field back to 1. Also, I need to start with the blank database. I am not sure how to approach that?

Can you assist?

Thanks

http://www.mssqlcity.com/FAQ/Devel/reset_identity_column.htm

Wednesday, March 7, 2012

Reprting Services 2000 Printing

Hi,
I am using Reporting services 2000 in asp.net application.Everything is working fine ,but when I am trying to get a print using Internet Explorer Printing options ,the toolbar of the report is also coming into the print preview.I want to get rid of it.I want only the report no toolbar.
Can anybody help me?
Thanks!!I am not sure if IE Printing options will allow you to do that. You might need to write some code to do that. I'll see if I can cook up something for you if I get the time.

Tuesday, February 21, 2012

ReportViewer's checked dropdown list control?

I would like to create my own parameter area for my reports which are displayed in an ASP.NET web page with the ASP.NET 2005 ReportViewer control (i.e. I have the ShowParameterPrompts property on my Report Viewer control set to False).

I would like to use the Checked Dropdown List control that allows you to check off each item individually or to check the (Select All) option for my multi-valued parameters.

Is there a way I can create an instance of this checked dropdown control or is there another component out there that is similar to it?

Thanks!!!

Brian

The control is not a public control and can not be created outside of the control. You would need to write your own.

-Daniel

ReportViewer's checked dropdown list control?

I would like to create my own parameter area for my reports which are
displayed in an ASP.NET web page with the ASP.NET 2005 ReportViewer control
(i.e. I have the ShowParameterPrompts property on my Report Viewer control
set to False).
I would like to use the Checked Dropdown List control that allows you to
check off each item individually or to check the (Select All) option for my
multi-valued parameters.
Is there a way I can create an instance of this checked dropdown control or
is there another component out there that is similar to it?
Thanks!!!
BrianMy understanding is that the only extensibility area the Report Viewer
supports is hiding the menus you don't need and writing your own. So, the
short answer is to your question is no. To re-confirm, please post your
question to
http://forums.microsoft.com/msdn/showforum.aspx?forumid=75&siteid=1. This
newsgroup is monitored by Rajeev Karunakaran who is the Program Manager of
the Report Viewer controls.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"brianpmccullough" <bmccullough11@.comcast.net> wrote in message
news:72596A04-35ED-434A-B30C-186F3ABB7CAA@.microsoft.com...
>I would like to create my own parameter area for my reports which are
> displayed in an ASP.NET web page with the ASP.NET 2005 ReportViewer
> control
> (i.e. I have the ShowParameterPrompts property on my Report Viewer control
> set to False).
> I would like to use the Checked Dropdown List control that allows you to
> check off each item individually or to check the (Select All) option for
> my
> multi-valued parameters.
> Is there a way I can create an instance of this checked dropdown control
> or
> is there another component out there that is similar to it?
> Thanks!!!
> Brian
>|||Teo,
Thanks for your help. I have posted to the Report Viewer's newsgroup, but
no response...
Any other ways I might be able to see if this "checked dropdown" control is
available for use in an asp.net page?
-Brian
"Teo Lachev [MVP]" wrote:
> My understanding is that the only extensibility area the Report Viewer
> supports is hiding the menus you don't need and writing your own. So, the
> short answer is to your question is no. To re-confirm, please post your
> question to
> http://forums.microsoft.com/msdn/showforum.aspx?forumid=75&siteid=1. This
> newsgroup is monitored by Rajeev Karunakaran who is the Program Manager of
> the Report Viewer controls.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "brianpmccullough" <bmccullough11@.comcast.net> wrote in message
> news:72596A04-35ED-434A-B30C-186F3ABB7CAA@.microsoft.com...
> >I would like to create my own parameter area for my reports which are
> > displayed in an ASP.NET web page with the ASP.NET 2005 ReportViewer
> > control
> > (i.e. I have the ShowParameterPrompts property on my Report Viewer control
> > set to False).
> >
> > I would like to use the Checked Dropdown List control that allows you to
> > check off each item individually or to check the (Select All) option for
> > my
> > multi-valued parameters.
> >
> > Is there a way I can create an instance of this checked dropdown control
> > or
> > is there another component out there that is similar to it?
> >
> > Thanks!!!
> >
> > Brian
> >
>
>

ReportViewer: Show toggle for specific item in a list??

Hello,
Wondering if anyone has any ideas about this:
I have ReportViewer on an ASP page with a report that has a list. The
list shows me rows and I want to be able to toggle just one of the
items in the list based on the type of item it is. Currently I can
only show the toggle icon for all the list items, like this:
+Item1
+Item2
+Item3
But I want the report to show only this:
Item1
+Item2
Item3
I've tried all manner of IIF formulas but none work. Is this even
possible?
ThanksPlease, does anyone have any experience with this?
On Mar 13, 6:11 pm, phrankbo...@.hotmail.com wrote:
> Hello,
> Wondering if anyone has any ideas about this:
> I have ReportViewer on an ASP page with a report that has a list. The
> list shows me rows and I want to be able to toggle just one of the
> items in the list based on the type of item it is. Currently I can
> only show the toggle icon for all the list items, like this:
> +Item1
> +Item2
> +Item3
> But I want the report to show only this:
> Item1
> +Item2
> Item3
> I've tried all manner of IIF formulas but none work. Is this even
> possible?
> Thanks

ReportViewer, VS2005 and SSRS 2005

I have developed a web app that uses forms authentication. I wrote it in asp.net 2.0. My server is running windows 2003 server standard and IIS. I have also installed on the same machine SQL Server 2005 with Reporting Services.

From my webapplication, I have a button that the user can click and then I have the Report Viewer control generate a report. However, I do not know how to pass the proper credentials to the report server. I would like to pass one username and password that has permissions to run that report. My code is follows:

Private Sub saveRptAs(ByVal s_rptType As String)
Dim warnings As Microsoft.Reporting.WebForms.Warning()
Dim streamids As String()
Dim mimeType As String
Dim encoding As String
Dim extension As String

ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://myserver/reportserver")
ReportViewer1.ServerReport.ReportPath = "/reports/Individual Report"


Dim test As New NetworkCredential("localuser", "password", "domain")

ReportViewer1.ServerReport.ReportServerCredentials = test

Dim rprameter As ReportParameter = New ReportParameter("user_no", Profile.DTGVariables.SelectedYMNo)
Me.ReportViewer1.ServerReport.SetParameters(New ReportParameter() {rprameter})

Dim bytes As Byte() = ReportViewer1.ServerReport.Render(s_rptType, Nothing, mimeType, encoding, extension, streamids, warnings)
Response.Buffer = True
Response.Clear()
Response.ContentType = mimeType
Response.AddHeader("content-disposition", "attachment; filename=sample." + extension)
Response.BinaryWrite(bytes)
Response.Flush()
Response.End()
End Sub

When I click on the button I get the following message:

Unable to cast object of type 'System.Net.NetworkCredential' to type 'Microsoft.Reporting.WebForms.IReportServerCredentials'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidCastException: Unable to cast object of type 'System.Net.NetworkCredential' to type 'Microsoft.Reporting.WebForms.IReportServerCredentials'.

Can someone help me with the credentials issue? Do I need to change Reporting Services to use Forms Authentication?

Your help and insight is greatly appreciated.

Thanks

Nate Dogg

put your credentials in web.config, that's how i worked around it

<identityimpersonate="true"userName="Domain\user"password="password"/>

|||try this - works for me
... ServerReport report = ReportViewer1.ServerReport; report.ReportServerCredentials = new MyReportServerCredentials(); ... class MyReportServerCredentials : IReportServerCredentials{ public MyReportServerCredentials() { } public System.Security.Principal.WindowsIdentity ImpersonationUser { get { return null; // Use default identity. } } public System.Net.ICredentials NetworkCredentials { get { return new System.Net.NetworkCredential("user", "pass", "domain"); } } public bool GetFormsCredentials(out System.Net.Cookie authCookie, out string user, out string password, out string authority) { authCookie = null; user = password = authority = null; return false; // Not use forms credentials to authenticate. } }
|||

Hey guys this is killing me also. I am using webhosting4life.com as my hosting company and have reporting services. I am trying the same thing the original poster is doing and getting the same error message. When I try the impersonate user I get the following error message. All I truly want is for the report viewer to pull open the report and display to the end user...but I need to pass my user name and password over....PLEASE HELP!! I have read several books and none of them touch on this.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Unspecified error
'

|||

It appears the error is in the web.config. Implementing theIReportServerCredentials as shown in the previous article works and is a good solution to only having the SRS work under that user context.

ReportViewer's checked dropdown list control?

I would like to create my own parameter area for my reports which are displayed in an ASP.NET web page with the ASP.NET 2005 ReportViewer control (i.e. I have the ShowParameterPrompts property on my Report Viewer control set to False).

I would like to use the Checked Dropdown List control that allows you to check off each item individually or to check the (Select All) option for my multi-valued parameters.

Is there a way I can create an instance of this checked dropdown control or is there another component out there that is similar to it?

Thanks!!!

Brian

The control is not a public control and can not be created outside of the control. You would need to write your own.

-Daniel