Hello !
I am using Reporting Services with SQL Server 2000 (SP3).
I am trying to build in dynamic coloring into my report depending on the
value in a certain field. Query already returns name of the color I would
like to use as an additional field (color conditions are driven by range of
data certain value falls into and stored in the database ). I simple need to
pick color stored in this field( it is Dataset field Color) and apply to
particular cell (possibly entire row) when rendering report. Colors are
returned as names: GREEN,RED,GREY etc.
Is there an easy way to accomplish this in Reporting Services?
Any help would be greatly appreciated.
IgorSelect the cell you want to colorize according to the value. Change the
BackColor property and use a VB expression instead of a hard-coded
color. Use the equal sign "=" in order to use a VB expression, just
like this :
=Fields!Color.Value
Since Green, Red and Gray are know colors, they will be authorized.
You also can do something like this (if my sales rate is under 50%, I
colorize in Red, otherwise, in green) :
=IIF(Fields!SalesRate.Value < 50, "Red", "Green")|||Thanks a lot Julich! It worked perfectly! I would actually like to stored
color logic inside that database so that query returns color instead of
having RS making this decisions.
Thanks again,
Igor
"Julich" <julich@.gmail.com> wrote in message
news:1118320972.223994.206500@.z14g2000cwz.googlegroups.com...
> Select the cell you want to colorize according to the value. Change the
> BackColor property and use a VB expression instead of a hard-coded
> color. Use the equal sign "=" in order to use a VB expression, just
> like this :
> =Fields!Color.Value
> Since Green, Red and Gray are know colors, they will be authorized.
> You also can do something like this (if my sales rate is under 50%, I
> colorize in Red, otherwise, in green) :
> =IIF(Fields!SalesRate.Value < 50, "Red", "Green")
>
Showing posts with label depending. Show all posts
Showing posts with label depending. Show all posts
Tuesday, March 27, 2012
Saturday, February 25, 2012
Change Subreport Name while running
Is there a way to change the subreport name while running a report.
Depending on the user that runs the main report i would like to present
another subreport.
The subreportname can't be changed by an expression.
I could place all subreports on it and then hide the ones that arn't needed
but i don't know if a subreport that has a visibility on 'hide' still runs.
That would slow down the main report if all the subreports are running.
Kind RegardsHello Harry,
There is no way to change the subreport on demand.
But, there is a way to work around it.
You could pass a parameter to the sub report and you could use this
parameter to decide whether to generate the data source or not.
If you did not generate the data, the render time for the sub report will
reduced.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Honestly yes,
I cant' find the place where i can bock datasets of being generated in the
report parameters ...
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:ju8%237sSHIHA.4200@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Harry,
You may use a stored procedure which could accept the parameter.
You could use the IF clause in the stored procedure to check the parameter
and dicide to return the empty dataset or not.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Depending on the user that runs the main report i would like to present
another subreport.
The subreportname can't be changed by an expression.
I could place all subreports on it and then hide the ones that arn't needed
but i don't know if a subreport that has a visibility on 'hide' still runs.
That would slow down the main report if all the subreports are running.
Kind RegardsHello Harry,
There is no way to change the subreport on demand.
But, there is a way to work around it.
You could pass a parameter to the sub report and you could use this
parameter to decide whether to generate the data source or not.
If you did not generate the data, the render time for the sub report will
reduced.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Honestly yes,
I cant' find the place where i can bock datasets of being generated in the
report parameters ...
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:ju8%237sSHIHA.4200@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Harry,
You may use a stored procedure which could accept the parameter.
You could use the IF clause in the stored procedure to check the parameter
and dicide to return the empty dataset or not.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Friday, February 24, 2012
Change SqlCommand Based On Combo Box Selection
I have a textbox, combo box, and a button on a form. I would like to perform a different query depending on the combo box selection. I thought I could do something such as:
if (cboSearch.Text =="Selection1") { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection1"; }else if (cboSearch.Text =="Selection2") { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection2"; }else { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection3"; } However, this obviously does not operate as I would need it to. What is the proper method for conditional SqlCommand statements like this?You need to pass the value in as a Control Parameter.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.controlparameter.aspx
Tuesday, February 14, 2012
Change Pie chart color
Hi,
I am using SQL Server 2005 Reporting Services.
I need to change the Pie chart data element colors depending on the value
for the data element.
eg: Yes should be in Green and No in RED
Assuming that you have two data fields / values in the chart, one for Yes and one of No - you could just edit the data values, go to the appearance tab, click on the series styles button and set the Fill Color to Green and Red, respectively.
-- Robert
Subscribe to:
Posts (Atom)