Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Friday, March 30, 2012

passing null reportparameter values

Hi,
Iâ'm using the report viewer object to view a report which works fine until I
need to pass null values. When I use the following code I get â'The
'reportId' parameter is missing a valueâ':
ReportViewer1.ShowParameterPrompts = false;
ReportParameter[] parameters = new ReportParameter[2];
parameters[0] = new ReportParameter("reportId");
parameters[1] = new ReportParameter("userid", "123");
ReportViewer1.ServerReport.SetParameters(parameters);
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.Refresh();
The reportId is setup for null values, however it still gives me an error:
<ReportParameter Name="reportId">
<DataType>Integer</DataType>
<Nullable>true</Nullable>
<Prompt>reportId</Prompt>
</ReportParameter>
I know other people have had this problem but using â'new
ReportParameter("reportId")â' doesnâ't work for me.
Thanks in advance!I'm guessing here, but do you need to explicitly set the value of the
null parameter. DBNull isn't the same as .Net C# null.
Regards, Rhys
On Sep 21, 11:50 pm, Nathan <nathan.et...@.online.nospam> wrote:
> Hi,
> I'm using the report viewer object to view a report which works fine until I
> need to pass null values. When I use the following code I get "The
> 'reportId' parameter is missing a value":
> ReportViewer1.ShowParameterPrompts = false;
> ReportParameter[] parameters = new ReportParameter[2];
> parameters[0] = new ReportParameter("reportId");
> parameters[1] = new ReportParameter("userid", "123");
> ReportViewer1.ServerReport.SetParameters(parameters);
> ReportViewer1.ProcessingMode => Microsoft.Reporting.WebForms.ProcessingMode.Remote;
> ReportViewer1.ServerReport.Refresh();
> The reportId is setup for null values, however it still gives me an error:
> <ReportParameter Name="reportId">
> <DataType>Integer</DataType>
> <Nullable>true</Nullable>
> <Prompt>reportId</Prompt>
> </ReportParameter>
> I know other people have had this problem but using "new
> ReportParameter("reportId")" doesn't work for me.
> Thanks in advance!

Monday, March 26, 2012

Passing log on info to sub reports

I am trying to access a Crystal report from ASP. This report has a linked sub report. I am able to view the main report from the ASP page. but when i access the sub report i get the error--> Server has not been started. which means that my sub report is not getting the database log on info. i tried passin the info with the code available on net. but the first line itself fails saying Object does not suppot this method. My code is

set crSections=session("oRpt").sections
'if i print the error message here it says object does not support this method.

For Each crSection In crSections
crReportObjects = crSection.ReportObjects

'loop through all the report objects to find all the subreports
For Each crReportObject In crReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then

'you will need to typecast the reportobject to a subreport()
'object once you find it

crSubreportObject = CType(crReportObject, SubreportObject)
'open the subreport object
crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

'set the database and tables objects to work with the subreport()
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
'loop through all the tables in the subreport and
'set up the connection info and apply it to the tables
For Each crTable In crTables
crTable.SetLogOnInfo "test" , "","test","test"
if crTable.TestConnectivity then
Response.Write "Connecting to sub" ' I am getting this message

end if

Next

End If
Next
Next

please point out what i am doin wrong. Greatly appreciate the help!The culprit is
crSubreportObject = CType(crReportObject, SubreportObject)
i commented this line and it works! :)

Passing in a Parameter by URL but Not displaying in tool bar

Currently we're using an application and the Report Viewer to "view"
our reports. One report that we need to generate is solely based on
the user's SalesRepCode. So what we want is that each user select a
report and then pass there SalesRepCode which we get from the
application, through the query string to Reporting Services to
generate that user's specific report. We don't want to give the user
the ability to use another user's SalesRepCode so we don't specify a
prompt for this parameter in the report parameters dialog boxes. This
is how I'm passing the SalesRepCode value to reporting services (I
know that the query string can be modified so the security on this is
weak. If you have an alternative solution I would love to hear it).
Is there anyway to pass in a parameter and not have it displayed on
the toolbar?
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
This is the error I'm receiving
The report parameter 'SalesRepCode' is read-only and cannot be
modified. (rsReadOnlyReportParameter) Get Online HelpIn order to pass a parameter via the query string but hide it in the toolbar
you will need to be running Reporting Services SP1. This is a new feature
in SP1.
If you have SP1 then edit the parameter properties of the report via the
Report Manager and check "Prompt User" and clear out the value of "Prompt
String" for your SalesRepCode parameter.
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> Currently we're using an application and the Report Viewer to "view"
> our reports. One report that we need to generate is solely based on
> the user's SalesRepCode. So what we want is that each user select a
> report and then pass there SalesRepCode which we get from the
> application, through the query string to Reporting Services to
> generate that user's specific report. We don't want to give the user
> the ability to use another user's SalesRepCode so we don't specify a
> prompt for this parameter in the report parameters dialog boxes. This
> is how I'm passing the SalesRepCode value to reporting services (I
> know that the query string can be modified so the security on this is
> weak. If you have an alternative solution I would love to hear it).
> Is there anyway to pass in a parameter and not have it displayed on
> the toolbar?
>
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> This is the error I'm receiving
> The report parameter 'SalesRepCode' is read-only and cannot be
> modified. (rsReadOnlyReportParameter) Get Online Help|||Hey Erik
I installed the SP1 and tried what you suggested. It still doesn't
work. When I go into the reports manager and select my report and
then select parameters from the left side the list of parameters
appears. For my parameter has default is checked but there is no
value in the default text box. Prompt user is unchecked and prompt
string is SalesRepCode:
I still get the same error stating that the parameter is readonly.
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> In order to pass a parameter via the query string but hide it in the toolbar
> you will need to be running Reporting Services SP1. This is a new feature
> in SP1.
> If you have SP1 then edit the parameter properties of the report via the
> Report Manager and check "Prompt User" and clear out the value of "Prompt
> String" for your SalesRepCode parameter.
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > Currently we're using an application and the Report Viewer to "view"
> > our reports. One report that we need to generate is solely based on
> > the user's SalesRepCode. So what we want is that each user select a
> > report and then pass there SalesRepCode which we get from the
> > application, through the query string to Reporting Services to
> > generate that user's specific report. We don't want to give the user
> > the ability to use another user's SalesRepCode so we don't specify a
> > prompt for this parameter in the report parameters dialog boxes. This
> > is how I'm passing the SalesRepCode value to reporting services (I
> > know that the query string can be modified so the security on this is
> > weak. If you have an alternative solution I would love to hear it).
> > Is there anyway to pass in a parameter and not have it displayed on
> > the toolbar?
> >
> >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> >
> > This is the error I'm receiving
> >
> > The report parameter 'SalesRepCode' is read-only and cannot be
> > modified. (rsReadOnlyReportParameter) Get Online Help|||Ok. Now:
1) Check the "Prompt User" checkbox so it is active
2) Remove the "SalesRepCode" value inside the "Prompt String" text field so
that the field is empty
3) Apply and try feeding the code via the query string.
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409020907.14bd20de@.posting.google.com...
> Hey Erik
> I installed the SP1 and tried what you suggested. It still doesn't
> work. When I go into the reports manager and select my report and
> then select parameters from the left side the list of parameters
> appears. For my parameter has default is checked but there is no
> value in the default text box. Prompt user is unchecked and prompt
> string is SalesRepCode:
> I still get the same error stating that the parameter is readonly.
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > In order to pass a parameter via the query string but hide it in the
toolbar
> > you will need to be running Reporting Services SP1. This is a new
feature
> > in SP1.
> > If you have SP1 then edit the parameter properties of the report via the
> > Report Manager and check "Prompt User" and clear out the value of
"Prompt
> > String" for your SalesRepCode parameter.
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > Currently we're using an application and the Report Viewer to "view"
> > > our reports. One report that we need to generate is solely based on
> > > the user's SalesRepCode. So what we want is that each user select a
> > > report and then pass there SalesRepCode which we get from the
> > > application, through the query string to Reporting Services to
> > > generate that user's specific report. We don't want to give the user
> > > the ability to use another user's SalesRepCode so we don't specify a
> > > prompt for this parameter in the report parameters dialog boxes. This
> > > is how I'm passing the SalesRepCode value to reporting services (I
> > > know that the query string can be modified so the security on this is
> > > weak. If you have an alternative solution I would love to hear it).
> > > Is there anyway to pass in a parameter and not have it displayed on
> > > the toolbar?
> > >
> > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > >
> > > This is the error I'm receiving
> > >
> > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > modified. (rsReadOnlyReportParameter) Get Online Help|||I'm such an idiot, I should pay more attention to what I write. I
didn't finish my paragraph.
Erik
I did what you said the first time. I removed the text in the "Prompt
String" text field, but when I pressed the "Apply" button I received a
warning for every other text box saying "A value is required." Because
all of my default text boxes were blank. Now I have
calculations/expressions for those default values in my reports so I
didnt' know exactly what to do so just for a test I placed default
values there and tried to submit the value via query string.
Unfortunatly I still receive a read-only error when I submit it. I
have installed the SP, I changed the parameters in the report manager.
Could it be another setting or maybe its machine specific?
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> Ok. Now:
> 1) Check the "Prompt User" checkbox so it is active
> 2) Remove the "SalesRepCode" value inside the "Prompt String" text field so
> that the field is empty
> 3) Apply and try feeding the code via the query string.
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > Hey Erik
> >
> > I installed the SP1 and tried what you suggested. It still doesn't
> > work. When I go into the reports manager and select my report and
> > then select parameters from the left side the list of parameters
> > appears. For my parameter has default is checked but there is no
> > value in the default text box. Prompt user is unchecked and prompt
> > string is SalesRepCode:
> >
> > I still get the same error stating that the parameter is readonly.
> >
> > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > In order to pass a parameter via the query string but hide it in the
> toolbar
> > > you will need to be running Reporting Services SP1. This is a new
> feature
> > > in SP1.
> > > If you have SP1 then edit the parameter properties of the report via the
> > > Report Manager and check "Prompt User" and clear out the value of
> "Prompt
> > > String" for your SalesRepCode parameter.
> > >
> > > --
> > > erik perez
> > > www.solien.com
> > >
> > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > Currently we're using an application and the Report Viewer to "view"
> > > > our reports. One report that we need to generate is solely based on
> > > > the user's SalesRepCode. So what we want is that each user select a
> > > > report and then pass there SalesRepCode which we get from the
> > > > application, through the query string to Reporting Services to
> > > > generate that user's specific report. We don't want to give the user
> > > > the ability to use another user's SalesRepCode so we don't specify a
> > > > prompt for this parameter in the report parameters dialog boxes. This
> > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > know that the query string can be modified so the security on this is
> > > > weak. If you have an alternative solution I would love to hear it).
> > > > Is there anyway to pass in a parameter and not have it displayed on
> > > > the toolbar?
> > > >
> > > >
> > >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > >
> > > > This is the error I'm receiving
> > > >
> > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > modified. (rsReadOnlyReportParameter) Get Online Help|||Did you try unchecking the "Has Default" checkboxes for those fields you are
feeding defaults to in the report?
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409030527.271c9ada@.posting.google.com...
> I'm such an idiot, I should pay more attention to what I write. I
> didn't finish my paragraph.
> Erik
> I did what you said the first time. I removed the text in the "Prompt
> String" text field, but when I pressed the "Apply" button I received a
> warning for every other text box saying "A value is required." Because
> all of my default text boxes were blank. Now I have
> calculations/expressions for those default values in my reports so I
> didnt' know exactly what to do so just for a test I placed default
> values there and tried to submit the value via query string.
> Unfortunatly I still receive a read-only error when I submit it. I
> have installed the SP, I changed the parameters in the report manager.
> Could it be another setting or maybe its machine specific?
>
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > Ok. Now:
> > 1) Check the "Prompt User" checkbox so it is active
> > 2) Remove the "SalesRepCode" value inside the "Prompt String" text field
so
> > that the field is empty
> > 3) Apply and try feeding the code via the query string.
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > Hey Erik
> > >
> > > I installed the SP1 and tried what you suggested. It still doesn't
> > > work. When I go into the reports manager and select my report and
> > > then select parameters from the left side the list of parameters
> > > appears. For my parameter has default is checked but there is no
> > > value in the default text box. Prompt user is unchecked and prompt
> > > string is SalesRepCode:
> > >
> > > I still get the same error stating that the parameter is readonly.
> > >
> > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > In order to pass a parameter via the query string but hide it in the
> > toolbar
> > > > you will need to be running Reporting Services SP1. This is a new
> > feature
> > > > in SP1.
> > > > If you have SP1 then edit the parameter properties of the report via
the
> > > > Report Manager and check "Prompt User" and clear out the value of
> > "Prompt
> > > > String" for your SalesRepCode parameter.
> > > >
> > > > --
> > > > erik perez
> > > > www.solien.com
> > > >
> > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > Currently we're using an application and the Report Viewer to
"view"
> > > > > our reports. One report that we need to generate is solely based
on
> > > > > the user's SalesRepCode. So what we want is that each user select
a
> > > > > report and then pass there SalesRepCode which we get from the
> > > > > application, through the query string to Reporting Services to
> > > > > generate that user's specific report. We don't want to give the
user
> > > > > the ability to use another user's SalesRepCode so we don't specify
a
> > > > > prompt for this parameter in the report parameters dialog boxes.
This
> > > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > > know that the query string can be modified so the security on this
is
> > > > > weak. If you have an alternative solution I would love to hear
it).
> > > > > Is there anyway to pass in a parameter and not have it displayed
on
> > > > > the toolbar?
> > > > >
> > > > >
> > > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > >
> > > > > This is the error I'm receiving
> > > > >
> > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > modified. (rsReadOnlyReportParameter) Get Online Help|||GREAT THAT WORKED!!!! THANKS
BUT now is there any way to pass a parameter without using the query
string. The SalesRepCode I'm trying to pass is sensitive information
and I don't want it in the query string. If you've got any
suggestions I'd love to hear them.
Phoenix
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<##LUp9bkEHA.3872@.TK2MSFTNGP11.phx.gbl>...
> Did you try unchecking the "Has Default" checkboxes for those fields you are
> feeding defaults to in the report?
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409030527.271c9ada@.posting.google.com...
> > I'm such an idiot, I should pay more attention to what I write. I
> > didn't finish my paragraph.
> >
> > Erik
> >
> > I did what you said the first time. I removed the text in the "Prompt
> > String" text field, but when I pressed the "Apply" button I received a
> > warning for every other text box saying "A value is required." Because
> > all of my default text boxes were blank. Now I have
> > calculations/expressions for those default values in my reports so I
> > didnt' know exactly what to do so just for a test I placed default
> > values there and tried to submit the value via query string.
> > Unfortunatly I still receive a read-only error when I submit it. I
> > have installed the SP, I changed the parameters in the report manager.
> > Could it be another setting or maybe its machine specific?
> >
> >
> > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > > Ok. Now:
> > > 1) Check the "Prompt User" checkbox so it is active
> > > 2) Remove the "SalesRepCode" value inside the "Prompt String" text field
> so
> > > that the field is empty
> > > 3) Apply and try feeding the code via the query string.
> > >
> > > --
> > > erik perez
> > > www.solien.com
> > >
> > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > > Hey Erik
> > > >
> > > > I installed the SP1 and tried what you suggested. It still doesn't
> > > > work. When I go into the reports manager and select my report and
> > > > then select parameters from the left side the list of parameters
> > > > appears. For my parameter has default is checked but there is no
> > > > value in the default text box. Prompt user is unchecked and prompt
> > > > string is SalesRepCode:
> > > >
> > > > I still get the same error stating that the parameter is readonly.
> > > >
> > > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > > In order to pass a parameter via the query string but hide it in the
> toolbar
> > > > > you will need to be running Reporting Services SP1. This is a new
> feature
> > > > > in SP1.
> > > > > If you have SP1 then edit the parameter properties of the report via
> the
> > > > > Report Manager and check "Prompt User" and clear out the value of
> "Prompt
> > > > > String" for your SalesRepCode parameter.
> > > > >
> > > > > --
> > > > > erik perez
> > > > > www.solien.com
> > > > >
> > > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > > Currently we're using an application and the Report Viewer to
> "view"
> > > > > > our reports. One report that we need to generate is solely based
> on
> > > > > > the user's SalesRepCode. So what we want is that each user select
> a
> > > > > > report and then pass there SalesRepCode which we get from the
> > > > > > application, through the query string to Reporting Services to
> > > > > > generate that user's specific report. We don't want to give the
> user
> > > > > > the ability to use another user's SalesRepCode so we don't specify
> a
> > > > > > prompt for this parameter in the report parameters dialog boxes.
> This
> > > > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > > > know that the query string can be modified so the security on this
> is
> > > > > > weak. If you have an alternative solution I would love to hear
> it).
> > > > > > Is there anyway to pass in a parameter and not have it displayed
> on
> > > > > > the toolbar?
> > > > > >
> > > > > >
> > > > >
> > >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > > >
> > > > > > This is the error I'm receiving
> > > > > >
> > > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > > modified. (rsReadOnlyReportParameter) Get Online Help|||If the salesrepcode can be tied to the logged in user you can use the global
variable User!userid and create a query to get the salesrepcode from a
table.
Bruce L-C
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409031308.1185e4ca@.posting.google.com...
> GREAT THAT WORKED!!!! THANKS
> BUT now is there any way to pass a parameter without using the query
> string. The SalesRepCode I'm trying to pass is sensitive information
> and I don't want it in the query string. If you've got any
> suggestions I'd love to hear them.
> Phoenix
>
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<##LUp9bkEHA.3872@.TK2MSFTNGP11.phx.gbl>...
> > Did you try unchecking the "Has Default" checkboxes for those fields you
are
> > feeding defaults to in the report?
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409030527.271c9ada@.posting.google.com...
> > > I'm such an idiot, I should pay more attention to what I write. I
> > > didn't finish my paragraph.
> > >
> > > Erik
> > >
> > > I did what you said the first time. I removed the text in the "Prompt
> > > String" text field, but when I pressed the "Apply" button I received a
> > > warning for every other text box saying "A value is required." Because
> > > all of my default text boxes were blank. Now I have
> > > calculations/expressions for those default values in my reports so I
> > > didnt' know exactly what to do so just for a test I placed default
> > > values there and tried to submit the value via query string.
> > > Unfortunatly I still receive a read-only error when I submit it. I
> > > have installed the SP, I changed the parameters in the report manager.
> > > Could it be another setting or maybe its machine specific?
> > >
> > >
> > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > > > Ok. Now:
> > > > 1) Check the "Prompt User" checkbox so it is active
> > > > 2) Remove the "SalesRepCode" value inside the "Prompt String" text
field
> > so
> > > > that the field is empty
> > > > 3) Apply and try feeding the code via the query string.
> > > >
> > > > --
> > > > erik perez
> > > > www.solien.com
> > > >
> > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > > > Hey Erik
> > > > >
> > > > > I installed the SP1 and tried what you suggested. It still
doesn't
> > > > > work. When I go into the reports manager and select my report and
> > > > > then select parameters from the left side the list of parameters
> > > > > appears. For my parameter has default is checked but there is no
> > > > > value in the default text box. Prompt user is unchecked and
prompt
> > > > > string is SalesRepCode:
> > > > >
> > > > > I still get the same error stating that the parameter is readonly.
> > > > >
> > > > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > > > In order to pass a parameter via the query string but hide it in
the
> > toolbar
> > > > > > you will need to be running Reporting Services SP1. This is a
new
> > feature
> > > > > > in SP1.
> > > > > > If you have SP1 then edit the parameter properties of the report
via
> > the
> > > > > > Report Manager and check "Prompt User" and clear out the value
of
> > "Prompt
> > > > > > String" for your SalesRepCode parameter.
> > > > > >
> > > > > > --
> > > > > > erik perez
> > > > > > www.solien.com
> > > > > >
> > > > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > > > Currently we're using an application and the Report Viewer to
> > "view"
> > > > > > > our reports. One report that we need to generate is solely
based
> > on
> > > > > > > the user's SalesRepCode. So what we want is that each user se
lect
> > a
> > > > > > > report and then pass there SalesRepCode which we get from the
> > > > > > > application, through the query string to Reporting Services to
> > > > > > > generate that user's specific report. We don't want to give
the
> > user
> > > > > > > the ability to use another user's SalesRepCode so we don't
specify
> > a
> > > > > > > prompt for this parameter in the report parameters dialog
boxes.
> > This
> > > > > > > is how I'm passing the SalesRepCode value to reporting
services (I
> > > > > > > know that the query string can be modified so the security on
this
> > is
> > > > > > > weak. If you have an alternative solution I would love to
hear
> > it).
> > > > > > > Is there anyway to pass in a parameter and not have it
displayed
> > on
> > > > > > > the toolbar?
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > > > >
> > > > > > > This is the error I'm receiving
> > > > > > >
> > > > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > > > modified. (rsReadOnlyReportParameter) Get Online Help

Passing Impersonation through the ReportViewer IFrame?

I am trying to impersonate a user through the web.config of the webapp that
I'm using to view reports. Reports are pulled back through the ReportViewer
object, and so, pulled back through an IFrame.
I impersonate the user which we set up in the report server, so that we can
bypass windows authentication dialog in the webapp and have impersonation do
this for us, so we can go straight into the report. When a user tries to go
to the service directly they get the prompt, and so are restricted. This is
what I'm after.
But, when I hit the report gen button on the Report Viewer it still prompts
for user/pass in a windows dialog. Is impersonation lost through the
IFrame? Does anyone have a better solution?
Appreciated,
Matt SIt sounds like you're creating a custom report manager. The call to the
report URL is separate from the call to the report manager; they are
separate web apps on the same server. In the Microsoft forms authentication
sample code, they deal with this issue by sharing session information
between the report manager and report server via an auth cookie.
I'm not sure exactly how this will apply to your situation, but hopefully
that helps you at least start tracking down the issues. See this article
for more information on the security interaction between the report manager
and report server:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.asp
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Matt Swift" <matthewswift@.deletethisbitplshotmail.com> wrote in message
news:OuzKQpd4EHA.1524@.TK2MSFTNGP09.phx.gbl...
>I am trying to impersonate a user through the web.config of the webapp that
> I'm using to view reports. Reports are pulled back through the
> ReportViewer
> object, and so, pulled back through an IFrame.
> I impersonate the user which we set up in the report server, so that we
> can
> bypass windows authentication dialog in the webapp and have impersonation
> do
> this for us, so we can go straight into the report. When a user tries to
> go
> to the service directly they get the prompt, and so are restricted. This
> is
> what I'm after.
> But, when I hit the report gen button on the Report Viewer it still
> prompts
> for user/pass in a windows dialog. Is impersonation lost through the
> IFrame? Does anyone have a better solution?
> Appreciated,
> Matt S
>sql

Monday, March 12, 2012

Passing a parameter from a form to an sql sequel view

Hi,

We have recently upsized an access db to a sequel server db. The queries in access have been made into views in sql. ASP will be the front end. We are having problems passing an input from a form into a view. In access the parameter had to match what was selected on the form but sequel doesn't like it. At the moment, for testing purposes, the value has to be hard coded i.e. case_id = 64. Is there anything is ASP that can help?

Thank you

You stated that you're looking for something in ASP to help you... I assume you are using some version of ASP.NET?

If you are using ASP.NET 1.1, you have a number of options, the easiest of which is creating a SqlCommand or SqlDataReader object and filtering the rows on the parameters you use. You'll need to manually pass the value on your form into the parameter value.

However, if you're on ASP.NET 2.0, the solution is even simpler. Just create an instance of the SqlDataSource class and wire up a SelectParameter to the desired control.

Hope this helps...