Showing posts with label reportviewer. Show all posts
Showing posts with label reportviewer. Show all posts

Wednesday, March 7, 2012

Hierarchical Subreports

Does the ReportViewer support hierachical subreports (a subreport in a
subreport)? If so, how do you get the SubreportProcessing event to fire on
the second or higher level subreports? Or better yet, how do you add a
subreport to a subreport and get it to populate?
--
Thanks,
PaulNo reason why you can not do hierarchical subreports. As with any report you
need to insert a subreport control and define the properties of this
subreport. These would include:
a) the subreport's name, and
b) the report parameter mappings (if any) to feed into the subreport
HTH,
Magendo_man
"Paul M" wrote:
> Does the ReportViewer support hierachical subreports (a subreport in a
> subreport)? If so, how do you get the SubreportProcessing event to fire on
> the second or higher level subreports? Or better yet, how do you add a
> subreport to a subreport and get it to populate?
> --
> Thanks,
> Paul

Sunday, February 26, 2012

Hiding SOME parameters in the parameter toolbar

I am using the ReportViewer.dll in a ASP.NET web application. The report
being displayed takes 2 parameters. One of these is programmatically set. I
would like the user to select values only for the other parameter. So when
displaying the report within the control, can I just show the second
parameter on the toolbar and hide the first one?
The Parameters toolbar property in the ReportViewer control corresponds to
the 'Parameters' URL access parameter, which hides/displays the entire
parameter toolbar
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?OK I solved the problem...You just type in a blank string for the Prompt
value...
"Aparna" wrote:
> I am using the ReportViewer.dll in a ASP.NET web application. The report
> being displayed takes 2 parameters. One of these is programmatically set. I
> would like the user to select values only for the other parameter. So when
> displaying the report within the control, can I just show the second
> parameter on the toolbar and hide the first one?
> The Parameters toolbar property in the ReportViewer control corresponds to
> the 'Parameters' URL access parameter, which hides/displays the entire
> parameter toolbar
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?|||On Wed, 26 Jan 2005 12:21:03 -0800, Aparna
<Aparna@.discussions.microsoft.com> wrote:
>OK I solved the problem...You just type in a blank string for the Prompt
>value...
>
How exactly does one "type in" a blank string? :)))
>"Aparna" wrote:
>> I am using the ReportViewer.dll in a ASP.NET web application. The report
>> being displayed takes 2 parameters. One of these is programmatically set. I
>> would like the user to select values only for the other parameter. So when
>> displaying the report within the control, can I just show the second
>> parameter on the toolbar and hide the first one?
>> The Parameters toolbar property in the ReportViewer control corresponds to
>> the 'Parameters' URL access parameter, which hides/displays the entire
>> parameter toolbar
>> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?|||haha...Not quite sure...However, it turns out my excitement was in vain...If
the prompt value is not specified, then the paratmeter becomes Read-only..So,
if you programatically want to assign values to it, you are out of luck! The
only way to set the value of that parameter is via the parameter property
page. So my orginal problem still stands...SOMEBODY HELLLP...
"Usenet User" wrote:
> On Wed, 26 Jan 2005 12:21:03 -0800, Aparna
> <Aparna@.discussions.microsoft.com> wrote:
> >OK I solved the problem...You just type in a blank string for the Prompt
> >value...
> >
> How exactly does one "type in" a blank string? :)))
>
> >"Aparna" wrote:
> >
> >> I am using the ReportViewer.dll in a ASP.NET web application. The report
> >> being displayed takes 2 parameters. One of these is programmatically set. I
> >> would like the user to select values only for the other parameter. So when
> >> displaying the report within the control, can I just show the second
> >> parameter on the toolbar and hide the first one?
> >>
> >> The Parameters toolbar property in the ReportViewer control corresponds to
> >> the 'Parameters' URL access parameter, which hides/displays the entire
> >> parameter toolbar
> >> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?
>

Friday, February 24, 2012

Hiding Parameters

Is it easy to hide the parameters of a report? Im using the ReportViewer tag in asp.net and I have my own parameters that I am passing into my report. But when the report renders, it shows the default parameters that look terrible in my application.

I was wondering if there was a way to only have my own parameters showing?

Thanks in advance everyone
man, just after I posted this I found the exact thing I wanted, the code is as follows:

reportViewer.Parameters = Microsoft.Samples.ReportingServices.ReportViewer.multiState.False;

hiding parameters

I'm using the included ReportViewer sample (basically it just just loads the
reporting services report page in an ifram), and I'd like to set report
parameters for the report by my ASP.NET application which houses the report.
Is there any way to have my app set the parameter, without prompting the
user?
--JasonI added a helper method to the ReportViewer:
public void SetQueryParameter(
string ParameterName,
string ParameterValue)
{
SetParameter(ParameterName,ParameterValue);
}
To set a parameter value then is as easy as:
rv.SetQueryParameter("SalesOrderNumber", "SO6003");
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
<jnadal@.comcast.net> wrote:
>I'm using the included ReportViewer sample (basically it just just loads the
>reporting services report page in an ifram), and I'd like to set report
>parameters for the report by my ASP.NET application which houses the report.
>Is there any way to have my app set the parameter, without prompting the
>user?
>--Jason
>|||Scott,
Thanks a ton -- I wasn't sure if that method would just be used for the
parameters for the reportservices UI or for the reports. That helped a
great deal!
--Jason
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:qmlfn050dor01d5ailc98qvlejmn2tl0rh@.4ax.com...
> I added a helper method to the ReportViewer:
> public void SetQueryParameter(
> string ParameterName,
> string ParameterValue)
> {
> SetParameter(ParameterName,ParameterValue);
> }
>
> To set a parameter value then is as easy as:
> rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> HTH,
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> <jnadal@.comcast.net> wrote:
> >I'm using the included ReportViewer sample (basically it just just loads
the
> >reporting services report page in an ifram), and I'd like to set report
> >parameters for the report by my ASP.NET application which houses the
report.
> >Is there any way to have my app set the parameter, without prompting the
> >user?
> >
> >--Jason
> >
>|||What name space is the "SetParameter" method a member of?
I get a compile error when I tried to copy and paste as is.
Thanks!!
Spo
"Scott Allen" wrote:
> I added a helper method to the ReportViewer:
> public void SetQueryParameter(
> string ParameterName,
> string ParameterValue)
> {
> SetParameter(ParameterName,ParameterValue);
> }
>
> To set a parameter value then is as easy as:
> rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> HTH,
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> <jnadal@.comcast.net> wrote:
> >I'm using the included ReportViewer sample (basically it just just loads the
> >reporting services report page in an ifram), and I'd like to set report
> >parameters for the report by my ASP.NET application which houses the report.
> >Is there any way to have my app set the parameter, without prompting the
> >user?
> >
> >--Jason
> >
>|||NEVER MIND.
I read this too quick the 1st time, i now understand what your doing.
Sorry and Thanks!
"iamspo" wrote:
> What name space is the "SetParameter" method a member of?
> I get a compile error when I tried to copy and paste as is.
> Thanks!!
> Spo
> "Scott Allen" wrote:
> > I added a helper method to the ReportViewer:
> >
> > public void SetQueryParameter(
> > string ParameterName,
> > string ParameterValue)
> > {
> > SetParameter(ParameterName,ParameterValue);
> > }
> >
> >
> > To set a parameter value then is as easy as:
> >
> > rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> >
> > HTH,
> >
> > --
> > Scott
> > http://www.OdeToCode.com/blogs/scott/
> >
> > On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> > <jnadal@.comcast.net> wrote:
> >
> > >I'm using the included ReportViewer sample (basically it just just loads the
> > >reporting services report page in an ifram), and I'd like to set report
> > >parameters for the report by my ASP.NET application which houses the report.
> > >Is there any way to have my app set the parameter, without prompting the
> > >user?
> > >
> > >--Jason
> > >
> >
> >

Hiding parameter passed through query string

I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
ReportViewer control in an ASP.NET page. The reports I link to all require a
sensitive parameter value and I have been passing that through using the
query string. Unfortunately, the entire URL of the report--including the
parameter in the query string--is visible in the source for the page, and I
don't want the user to see this for security purposes.
Is there a way to hide this? I'm open to any and all suggestions.
Thanks,
MarkSearch the group on encryption - use System.Security.Cryptography package
I just repeat myself from a previous posting:
"Parameter's encryption is a key to solve your problem.
The simplest ( but not the only) way is:
1.create your own parameters collection pages (forms).
2. encrypt user input using a permanent or temporary encryption key.
3. Reference encryption assembly in your report designer.
4. use a decryption routine in your custom code akin
"=Code.Library.Decrypt(Parameters!account_id);" by retrieving an encryption
key used in step 2.
By using this approach even a simplest parameter will be totally un
guessable, because even a single digit will be encrypted to something like
"bHZiajB4TGpBdU1"
"
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
> ReportViewer control in an ASP.NET page. The reports I link to all require
> a
> sensitive parameter value and I have been passing that through using the
> query string. Unfortunately, the entire URL of the report--including the
> parameter in the query string--is visible in the source for the page, and
> I
> don't want the user to see this for security purposes.
> Is there a way to hide this? I'm open to any and all suggestions.
> Thanks,
> Mark|||For RS 2000 you can use web services. There is really no way using URL
integration to hide it from the source. You can hide it from the page being
displayed but if they go View, Source they will see it.
In VS 2005 there are two new controls that work with RS 2005. They use web
services under the covers, not URL integration. You do have to have RS 2005.
Note that you can upgrade to RS 2005 while leaving the database at 2000
(that is what I have done). You do need a SQL Server 2005 license for this
however.
My suggestion is if security is important then you use the new controls.
One other option, put the parameters in a database table and then pass the
primary key to the table and have a dataset extracting the parameters.
This does make things more complicated but it is a version independent
solution (if you can convince management to upgrade to RS 2005). Note what I
said about upgrading. Sometimes it is easier to get permission to upgrade
reporting services than it is to upgrade a SQL Server database.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
> ReportViewer control in an ASP.NET page. The reports I link to all require
> a
> sensitive parameter value and I have been passing that through using the
> query string. Unfortunately, the entire URL of the report--including the
> parameter in the query string--is visible in the source for the page, and
> I
> don't want the user to see this for security purposes.
> Is there a way to hide this? I'm open to any and all suggestions.
> Thanks,
> Mark|||Good point. I forgot about doing that.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Oleg Yevteyev" <myfirstname001atgmaildotcom> wrote in message
news:OdtQOZxCGHA.1816@.TK2MSFTNGP11.phx.gbl...
> Search the group on encryption - use System.Security.Cryptography package
> I just repeat myself from a previous posting:
> "Parameter's encryption is a key to solve your problem.
> The simplest ( but not the only) way is:
> 1.create your own parameters collection pages (forms).
> 2. encrypt user input using a permanent or temporary encryption key.
> 3. Reference encryption assembly in your report designer.
> 4. use a decryption routine in your custom code akin
> "=Code.Library.Decrypt(Parameters!account_id);" by retrieving an
> encryption
> key used in step 2.
> By using this approach even a simplest parameter will be totally un
> guessable, because even a single digit will be encrypted to something like
> "bHZiajB4TGpBdU1"
> "
>
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
>> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
>> ReportViewer control in an ASP.NET page. The reports I link to all
>> require a
>> sensitive parameter value and I have been passing that through using the
>> query string. Unfortunately, the entire URL of the report--including the
>> parameter in the query string--is visible in the source for the page, and
>> I
>> don't want the user to see this for security purposes.
>> Is there a way to hide this? I'm open to any and all suggestions.
>> Thanks,
>> Mark
>