Showing posts with label dynamically. Show all posts
Showing posts with label dynamically. Show all posts

Wednesday, March 28, 2012

Hide Certain Parameters Dynamically

We have a number of reports which are used by both employees and
administrators with multiple parameters. In many of these reports we have
some parameters unique to the employees which we would like to automatically
set through URL access for our employees and either hide or set them as
read-only so an employee cannot view someone else's data. However, we want
to allow the administrators to change these values so they can view data from
any employee.
So, is there any way to dynamically hide a single parameter while still
showing the remaining ones, or to dynamically make a single parameter
read-only without creating a custom front end? I don't need to know how to
pass default values, just how to programmatically change what parameters are
hidden / read-only.
Thanks in advance.
DavidDavid,
It isn't possible to hide a parameter or make it readonly. A possible
solution for this problem is to create two new reports. One for the employees
and one for the administartors. Both reports get the proper parameters which
they may change. In both reports you include an subreport, the original one
with all parameters. Now you can link the parameters from the report to the
subreport. In teh case for the employees this meens that some parameters of
your original report will have an fixed value.
This solution will also prevent employees from 'trying' out the parameters
with URL Access.
Jan Pieter Posthuma
"David Siebert" wrote:
> We have a number of reports which are used by both employees and
> administrators with multiple parameters. In many of these reports we have
> some parameters unique to the employees which we would like to automatically
> set through URL access for our employees and either hide or set them as
> read-only so an employee cannot view someone else's data. However, we want
> to allow the administrators to change these values so they can view data from
> any employee.
> So, is there any way to dynamically hide a single parameter while still
> showing the remaining ones, or to dynamically make a single parameter
> read-only without creating a custom front end? I don't need to know how to
> pass default values, just how to programmatically change what parameters are
> hidden / read-only.
> Thanks in advance.
> David|||Thanks for the reply, I think I may have found a way that will work for our
needs using linked reports. I created a linked report to the original, and
hid any parameters that the employee does not need to change. It solves the
problem of having to maintain and edit 2 reports when changes are made, and
appears to have solved my issue with being able to change parameter settings
for the 2 separate versions.
"Jan Pieter Posthuma" wrote:
> David,
> It isn't possible to hide a parameter or make it readonly. A possible
> solution for this problem is to create two new reports. One for the employees
> and one for the administartors. Both reports get the proper parameters which
> they may change. In both reports you include an subreport, the original one
> with all parameters. Now you can link the parameters from the report to the
> subreport. In teh case for the employees this meens that some parameters of
> your original report will have an fixed value.
> This solution will also prevent employees from 'trying' out the parameters
> with URL Access.
> Jan Pieter Posthuma
> "David Siebert" wrote:
> > We have a number of reports which are used by both employees and
> > administrators with multiple parameters. In many of these reports we have
> > some parameters unique to the employees which we would like to automatically
> > set through URL access for our employees and either hide or set them as
> > read-only so an employee cannot view someone else's data. However, we want
> > to allow the administrators to change these values so they can view data from
> > any employee.
> >
> > So, is there any way to dynamically hide a single parameter while still
> > showing the remaining ones, or to dynamically make a single parameter
> > read-only without creating a custom front end? I don't need to know how to
> > pass default values, just how to programmatically change what parameters are
> > hidden / read-only.
> >
> > Thanks in advance.
> >
> > David

Monday, March 26, 2012

Hide and Show Background image dynamically

I am trying to place a background image on a report based on a database
field called watermark. I have not found a way to create an expresion
or code that would allow me to display this background image on some
pages based on the water mark field. Is it possible to do this?I have been working hard to try to figure this out. I would really
appreciate any help. I need to be able to stamp certain pages on a
multiple paged report with a watermark that says "PAST DUE".
Thanks in advance for any help you can give me|||> I have been working hard to try to figure this out. I would really
> appreciate any help. I need to be able to stamp certain pages on a
> multiple paged report with a watermark that says "PAST DUE".
We use an expression in the background image property of the Report Body.
This is how we do it:
=IIF(your condition, "image name", Nothing)
Hope this works for you...
MK

Friday, March 23, 2012

Hidden columns exporting in CSV

I am writing a report to export columns dynamically. The column's Hidden
property is controlled by an expression (=Cbool(parameters.hidecol.value))
which works ok in Excel and PDF export. However, whenever I export in CSV,
this property is ignored and the column is never exported.
Is this a bug in reporting service or is it by design?
I have SQL reporting service 2005 with SP1 and all the hotfixes.Imran,
I got a reply from a MS contact on msdn. Here is his reply for anyone
else with the same problem...
John,
You can't conditionally hide and show data in data renderers (CSV,
XML). This is by design. If you have an expression in the Hidden field
and 'Auto' in DataOutput tab for text boxes in the column, your data
will not be rendered into CSV or XML.
You can set DataElementOutput to Output for textboxes in the cells and
in the header, and the coulmn will always be in the output file.
Thanks!
----
- DenisL (SQL RS Team)
Imran wrote:
> I am writing a report to export columns dynamically. The column's Hidden
> property is controlled by an expression (=Cbool(parameters.hidecol.value))
> which works ok in Excel and PDF export. However, whenever I export in CSV,
> this property is ignored and the column is never exported.
> Is this a bug in reporting service or is it by design?
> I have SQL reporting service 2005 with SP1 and all the hotfixes.|||Actually I was expecting a solution rather than a refresher on "status quo"
from Microsoft. Ofcourse I am aware of this issue and there are several
codable workaround for this... Was curious if someone had already done this
or if another hotfix is on its way to resolve this.
Imran
"johnburns007@.gmail.com" wrote:
> Imran,
> I got a reply from a MS contact on msdn. Here is his reply for anyone
> else with the same problem...
> John,
> You can't conditionally hide and show data in data renderers (CSV,
> XML). This is by design. If you have an expression in the Hidden field
> and 'Auto' in DataOutput tab for text boxes in the column, your data
> will not be rendered into CSV or XML.
> You can set DataElementOutput to Output for textboxes in the cells and
> in the header, and the coulmn will always be in the output file.
> Thanks!
>
> ----
> - DenisL (SQL RS Team)
>
> Imran wrote:
> > I am writing a report to export columns dynamically. The column's Hidden
> > property is controlled by an expression (=Cbool(parameters.hidecol.value))
> > which works ok in Excel and PDF export. However, whenever I export in CSV,
> > this property is ignored and the column is never exported.
> >
> > Is this a bug in reporting service or is it by design?
> >
> > I have SQL reporting service 2005 with SP1 and all the hotfixes.
>