Showing posts with label displaying. Show all posts
Showing posts with label displaying. Show all posts

Monday, March 19, 2012

Dynamic Graphs

I want let the end user decide on which type of graphic(via a report
parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
couldn't find any option to define the chart type e.g. with the aid of an
expression. Do I have to place any possible chart type in my report layout
and control the appearance by defining an expression for the 'visibility'
property?Niklas,
You can't do it with an expression. Instead, the option I would go for is
building a custom app to get the user selection and update the report RDL.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Niklas" <Niklas@.discussions.microsoft.com> wrote in message
news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> I want let the end user decide on which type of graphic(via a report
> parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
> couldn't find any option to define the chart type e.g. with the aid of an
> expression. Do I have to place any possible chart type in my report layout
> and control the appearance by defining an expression for the 'visibility'
> property?|||Thanks Teo,
I often see answers, dealing with generating the RDL dynamically. Please
correct me, if I'm wrong, but I don't think this is a solution in a
multi-user environment. I need fixed RDL files, guaranteeing the same
behaviour. So, I cannot change the RDL, every time a user wants to access the
report?!?!
"Teo Lachev [MVP]" wrote:
> Niklas,
> You can't do it with an expression. Instead, the option I would go for is
> building a custom app to get the user selection and update the report RDL.
> --
> Hope this helps.
> ---
> Teo Lachev, MVP [SQL Server], MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ---
> "Niklas" <Niklas@.discussions.microsoft.com> wrote in message
> news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> > I want let the end user decide on which type of graphic(via a report
> > parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
> > couldn't find any option to define the chart type e.g. with the aid of an
> > expression. Do I have to place any possible chart type in my report layout
> > and control the appearance by defining an expression for the 'visibility'
> > property?
>
>|||Niklas,
Not really. You basically need to generated the report RDL and upload it to
the report catalog under an unique name, e.g. the user logon id. The way I
addressed this on a similar occasion in the past was to have the report
template RDL file included in my web application. My web app will load the
template, change it as needed and upload it to the report catalog. Then, it
will render the report. Finally, when the user logs out, the web app will
purge the report.
Does this make sense?
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Niklas" <Niklas@.discussions.microsoft.com> wrote in message
news:E1B5C271-5C8A-4C15-9C75-615ADFFF1678@.microsoft.com...
> Thanks Teo,
> I often see answers, dealing with generating the RDL dynamically. Please
> correct me, if I'm wrong, but I don't think this is a solution in a
> multi-user environment. I need fixed RDL files, guaranteeing the same
> behaviour. So, I cannot change the RDL, every time a user wants to access
the
> report?!?!
> "Teo Lachev [MVP]" wrote:
> > Niklas,
> >
> > You can't do it with an expression. Instead, the option I would go for
is
> > building a custom app to get the user selection and update the report
RDL.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ---
> >
> > "Niklas" <Niklas@.discussions.microsoft.com> wrote in message
> > news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> > > I want let the end user decide on which type of graphic(via a report
> > > parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.)
I
> > > couldn't find any option to define the chart type e.g. with the aid of
an
> > > expression. Do I have to place any possible chart type in my report
layout
> > > and control the appearance by defining an expression for the
'visibility'
> > > property?
> >
> >
> >

Sunday, February 19, 2012

Dynamic columns

Hi,

In my report i want to display dynamic columns.For displaying what are columns available to user,Iam displaying the columns names in one multivalued parameter.For example in my report i have Date,CaseId,Age,State as columns,and multivalued parameter name is "Columns".

I wrote a custom function i.e ShowParameterValues(...) returns String s.If we select the Date and CaseID from the columns then s contain value:Date CaseID

Public Function ShowParameterValues(ByVal parameter as Parameter) as string
Dim s as String
For i as integer = 0 to parameter.Count-1
s =s+ CStr(parameter.Value(i))
Next
Return s
End Function

Now i want to show those two columns only.How to acheve this.

Thanks in advance

Currently, the RS object model doesn't support this feature. You can:

1. Include all columns on the report and hiding the ones that are not needed conditionally (Hidden property = True)

2. Implement a custom application which changes and uploads the report definition.

|||

Hi,

How to hide some columns conditionally.I need all the columns,show the columns which the user selects from multivalued parameter.

Thanks in advance

|||

Each column has a Hidden property which can be expression-based, e.g.:

=IIF(<evaluate your parameter selection condition>, True, False)

|||

Hi,

I know this.But how to write the condition,how would we know which column is selected from multivalued parameter

Please help me

Thanks in advance

|||Hi,
i am doing something similar for a selector where the user pick a start period and an end period. I am not using Matrix in this case because I want the table.
Should be similar enough to what you want to do.

In the second Column Hidden property put something like that:

= iif( CountRows("(Items_Selected") <2, True, False)
And increase the number by 1 for each consecutive column.

Have a dataset "Items_Selected" build upon your multi-select, something like that:

select Distinct
Case @.Time_Items when 'Qtr' then b.Qtr when 'Mth' then b.Mth when 'Week' then b.Week end as item
FROM onGlobals.dbo.tb_TimeBillBack b with(nolock)
where Case @.Time_Items when 'Qtr' then b.Qtr when 'Mth' then b.Mth when 'Week' then b.Week end >= @.Period_Start
AND Case @.Time_Items when 'Qtr' then b.Qtr when 'Mth' then b.Mth when 'Week' then b.Week end <= @.Period_End

Where you would have the b table build with all possible values present in your multi-value parameter.

Change the code above to use a IN clause to evaluate your multi-values.

It is kind of a hack which I hate but it works. Set the report layout with all possible columns and set the hidden property of each and every one of them.
Philippe|||http://msdn2.microsoft.com/en-us/library/aa337293.aspx

Dynamic Columns

Hi there
I have a problem with displaying the columns of my report. I have a stored
proc that creates my columns dynamically based on the data, eg
TonsHarvested1998, TonsHarvested2000, etc. These are sample column headers
returned by my proc.
I have no idea as to how I can display this data as the columns dont appear
on the fields designer so I cant figure out how I can display them in my
table and put them into my textboxes.
Can anyone give me an idea as to how I can go about doing this.
ThanksI worked on a project a while back that was like this... The result set was
ONLY returned when the proper parameters were sent, and the app didn't send
any parameters so none of the intelligent stuff worked... Perhaps RS is
using the returned result set (using reflection) to show the column names,
etc... What we did was provide default values for the parameters that caused
the type of result set we wanted to use at design time... In the SP , if
@.param=1 select yaada,...
What I suspect will NOT work is variable number or names for parameters,
because the mappings to fields etc is done at design time.. ( although I
could easily be mistaken)...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Kershni Chetty" <support@.sqrsoftware.com> wrote in message
news:ettdSnHeEHA.3664@.TK2MSFTNGP12.phx.gbl...
> Hi there
> I have a problem with displaying the columns of my report. I have a stored
> proc that creates my columns dynamically based on the data, eg
> TonsHarvested1998, TonsHarvested2000, etc. These are sample column headers
> returned by my proc.
> I have no idea as to how I can display this data as the columns dont
appear
> on the fields designer so I cant figure out how I can display them in my
> table and put them into my textboxes.
> Can anyone give me an idea as to how I can go about doing this.
> Thanks
>