Showing posts with label bar. Show all posts
Showing posts with label bar. Show all posts

Tuesday, March 27, 2012

Customize Help Icon

Hello,
Is it possible to either:
a) disable the help icon on the navigation bar
b) change the location it links to one of our help files
I tried to change the image to visible = false, but do to cross frame
security I was getting permission denied messages. Any technique would be
appreciated.
Thanks
KrisWith SP1, you can change the style sheet used by the viewer toolbar to hide
the icon. Unfortunately, this only works through URL access (you have to
supply the name of the style sheet). In SP2, you will be able to set a
config setting to change the default one.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kris Kimbrough" <KrisKimbrough@.discussions.microsoft.com> wrote in message
news:2470ABD9-E863-4836-8431-B6849104029E@.microsoft.com...
> Hello,
> Is it possible to either:
> a) disable the help icon on the navigation bar
> b) change the location it links to one of our help files
> I tried to change the image to visible = false, but do to cross frame
> security I was getting permission denied messages. Any technique would be
> appreciated.
> Thanks
> Kris
>

Sunday, March 25, 2012

Customising toolbar in the browser of RS HTML viewer

Dear friends,

please help me by commenting on my query.

Query::

I want to know how to customise the tool bar in RS HTML viewer, we can hide or show the toolbar using rc:toolbar= false/true, But i want to customise the tool bar.

ie, There is a combo for export formats to export the displaying reports. I want to customise that combo. I can clear the items by removing the extension element in the config of RS, but i want to do it in run time .

ie, My different reports should show different export formats simulteniously

You can customize the individual items on the toolbar with the information below:

http://blogs.msdn.com/bimusings/archive/2005/07/08/436887.aspx

However, there is no way to dynamically customize the rendering extensions that can be used at runtime (or on a per-report basis). You essentially enable or disable each rendering extension in the config files, and based on this work, certain formats show or don't show in the combo-box.

If you *must* have this functionality, I'd suggest that you turn off the toolbar completely and create your own version of the HTML toolbar which handles paging, zooming, etc. via URL Access (There is a sample of this in SSRS 2000). If you go this route, YOU can choose what rendering extensions to show the user in your own combo-box...However this will take a fair amount of work.

|||

As u said i checked the path

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\styles

the Styles folder doesn't exist. my version is RS 2000 enterprise Edition.

i searched for .css files in my installation folder i only got one major css ie ,reportingservices.css in

Reportmanager\styles

|||

It's very helpful and good article.

but can we make the changes in main "htmlviewer.css" and we got the reflected changes in all the reportserver reports.so by doing this we don't have to make another copy of css file and give "rc:Stylesheet=cssfilename".

i have also second question is there any way by which we can pass "rc:Stylesheet=cssfilename" URL to parent report to child report(by drilling down-jump to report) method.

thanks in advance.

|||

i didnt see any provision for adding url parameters in child reports. but we shall try one thing .

In your parent u add a parametr in some name "stylesheet" , and pass the value . this we can do . and while making the chil report u can assign parametrs or that , so create a parameter in the name "rc:Stylesheet" and select the value . the value is the parent parame value

ie , "rc:Stylesheet = stylesheet "

hope u will inform me regarding this

|||

Hai it's good idea, thanks ..

i did one try and it's working.

i had add "rc:Stylesheet=cssfilename" in my parent report, now when i am drilling down to child report

"rc:Stylesheet=cssfilename" parameter will automatcally carried forward to next report(child report).so there is no problem

for passing "rc:Stylesheet=cssfilename" one report to another report.

but i try your solution in different case, because i have also problem while passing "rs:clearsession=true" to other report.

Thanks,
Sanket.

|||

Hi .

I had made the changes in respective CSS file for hiding print icon in report toolbar and deployed report in local reporting

service machine (LAN) and our onsite machine.

but the problem i am facing is when i am accessing my local reporting server machine at that time print icon is not

visible.so it's as per my requirement. but when i am accessing our onsite machine reporting server at that time i seen print

icon and it's only seen in my PC, my other team members doesn't seen that print icon both on local reporting service machine

and onsite reporting service machine.

can anyone help me out in this issue, because it's very urgent ..

Thanks,
Sanket.

Customising toolbar in the browser of RS HTML viewer

Dear friends,

please help me by commenting on my query.

Query::

I want to know how to customise the tool bar in RS HTML viewer, we can hide or show the toolbar using rc:toolbar= false/true, But i want to customise the tool bar.

ie, There is a combo for export formats to export the displaying reports. I want to customise that combo. I can clear the items by removing the extension element in the config of RS, but i want to do it in run time .

ie, My different reports should show different export formats simulteniously

You can customize the individual items on the toolbar with the information below:

http://blogs.msdn.com/bimusings/archive/2005/07/08/436887.aspx

However, there is no way to dynamically customize the rendering extensions that can be used at runtime (or on a per-report basis). You essentially enable or disable each rendering extension in the config files, and based on this work, certain formats show or don't show in the combo-box.

If you *must* have this functionality, I'd suggest that you turn off the toolbar completely and create your own version of the HTML toolbar which handles paging, zooming, etc. via URL Access (There is a sample of this in SSRS 2000). If you go this route, YOU can choose what rendering extensions to show the user in your own combo-box...However this will take a fair amount of work.

|||

As u said i checked the path

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\styles

the Styles folder doesn't exist. my version is RS 2000 enterprise Edition.

i searched for .css files in my installation folder i only got one major css ie ,reportingservices.css in

Reportmanager\styles

|||

It's very helpful and good article.

but can we make the changes in main "htmlviewer.css" and we got the reflected changes in all the reportserver reports.so by doing this we don't have to make another copy of css file and give "rc:Stylesheet=cssfilename".

i have also second question is there any way by which we can pass "rc:Stylesheet=cssfilename" URL to parent report to child report(by drilling down-jump to report) method.

thanks in advance.

|||

i didnt see any provision for adding url parameters in child reports. but we shall try one thing .

In your parent u add a parametr in some name "stylesheet" , and pass the value . this we can do . and while making the chil report u can assign parametrs or that , so create a parameter in the name "rc:Stylesheet" and select the value . the value is the parent parame value

ie , "rc:Stylesheet = stylesheet "

hope u will inform me regarding this

|||

Hai it's good idea, thanks ..

i did one try and it's working.

i had add "rc:Stylesheet=cssfilename" in my parent report, now when i am drilling down to child report

"rc:Stylesheet=cssfilename" parameter will automatcally carried forward to next report(child report).so there is no problem

for passing "rc:Stylesheet=cssfilename" one report to another report.

but i try your solution in different case, because i have also problem while passing "rs:clearsession=true" to other report.

Thanks,
Sanket.

|||

Hi .

I had made the changes in respective CSS file for hiding print icon in report toolbar and deployed report in local reporting

service machine (LAN) and our onsite machine.

but the problem i am facing is when i am accessing my local reporting server machine at that time print icon is not

visible.so it's as per my requirement. but when i am accessing our onsite machine reporting server at that time i seen print

icon and it's only seen in my PC, my other team members doesn't seen that print icon both on local reporting service machine

and onsite reporting service machine.

can anyone help me out in this issue, because it's very urgent ..

Thanks,
Sanket.

Tuesday, March 20, 2012

Custom Series Color in SP1 Charts

I'm trying to figure out how to create a custom series color in a bar chart,
and am unable to find documentation on it.
I read a post here on trying the Choose() function in the fill color portion
of the series value, but my chart goes gray in the layout mode, and then in
the preview mode it just shows the default colors.
Any documentation on this I can read?Keep in mind that expressions cannot be evaluated in design mode.
From the SP1 Readme about chart enhancements:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
"If you use an expression for fill color, the chart elements will be white
in Layout view, but will display properly when the report is run."
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:1AA68AB0-128E-44B2-8519-6357D7EBD465@.microsoft.com...
> I'm trying to figure out how to create a custom series color in a bar
chart,
> and am unable to find documentation on it.
> I read a post here on trying the Choose() function in the fill color
portion
> of the series value, but my chart goes gray in the layout mode, and then
in
> the preview mode it just shows the default colors.
> Any documentation on this I can read?|||That makes sense,
But still having an issue of what function to use in the fill color field.
I have
=IIf( Fields!descriptn.Value = "Self", "white","Transparent")
But it seems to ingore it.
"Robert Bruckner [MSFT]" wrote:
> Keep in mind that expressions cannot be evaluated in design mode.
> From the SP1 Readme about chart enhancements:
> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
> "If you use an expression for fill color, the chart elements will be white
> in Layout view, but will display properly when the report is run."
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:1AA68AB0-128E-44B2-8519-6357D7EBD465@.microsoft.com...
> > I'm trying to figure out how to create a custom series color in a bar
> chart,
> > and am unable to find documentation on it.
> >
> > I read a post here on trying the Choose() function in the fill color
> portion
> > of the series value, but my chart goes gray in the layout mode, and then
> in
> > the preview mode it just shows the default colors.
> >
> > Any documentation on this I can read?
>
>|||There might be multiple issues here:
* A chart is similar to a matrix. Therefore a "cell" (datapoint) in a chart
can actually contain multiple rows depending on the groupings applied. Using
Fields!description.Value will always return the first value if multiple rows
are present.
If series groupings are present in the chart, you have to use
=First(Fields!description.Value, "NameOfInnermostSeriesGrouping") to get the
correct datapoint value in your expression. You might also want to check
this thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=15f4e34b-345a-4876-8cbe-734b9e4dfa53&sloc=en-us
* Transparent is not a valid color. The only exceptions are currently the
chart area and the plot area fill colors (it's on the wishlist for
extensions in a future release).
Since transparent is not valid color, it gets ignored and the default color
(from the palette) applies. If you want to "hide" entire
datapoints/categories, you can filter them. If you have a solid plotarea
background color you could also assign the plotarea color to hide
datapoints.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:917930D0-5D0E-4231-A6BD-1B58602D4D9F@.microsoft.com...
> That makes sense,
> But still having an issue of what function to use in the fill color field.
> I have
> =IIf( Fields!descriptn.Value = "Self", "white","Transparent")
> But it seems to ingore it.
> "Robert Bruckner [MSFT]" wrote:
> > Keep in mind that expressions cannot be evaluated in design mode.
> > From the SP1 Readme about chart enhancements:
> >
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
> > "If you use an expression for fill color, the chart elements will be
white
> > in Layout view, but will display properly when the report is run."
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Matt" <Matt@.discussions.microsoft.com> wrote in message
> > news:1AA68AB0-128E-44B2-8519-6357D7EBD465@.microsoft.com...
> > > I'm trying to figure out how to create a custom series color in a bar
> > chart,
> > > and am unable to find documentation on it.
> > >
> > > I read a post here on trying the Choose() function in the fill color
> > portion
> > > of the series value, but my chart goes gray in the layout mode, and
then
> > in
> > > the preview mode it just shows the default colors.
> > >
> > > Any documentation on this I can read?
> >
> >
> >|||We create one particular line chart in which the number of lines will be
different based on what the user selects when printing the report. They graph
the performance of their portfolio to that of 1-5 different indices. So the
chart will have between 2 and 6 different lines on it.
In the data tab of the chart, we have one item listed under values, one
under category groups, and one under series groups.
Everything works great. Our problem is that when there are so many lines
that the chart uses a Green and LightGreen color for two of the lines, our
client can't tell those two colors apart and wants us to use a different
color than LightGreen.
We have tried to use the various suggestions seen in this and other blogs to
customize the color but it doesn't work.
Can anyone help us? I can provide more info if needed.
This is what we have tried under
Edit Value=>Appearance=>Series Style=>Fill=>Color=>Expression:
=Choose(Fields!uv_port_type.Value,"Red","Blue","Green","Yellow","Purple","Orange")
=CStr(Choose(Fields!uv_port_type.Value,"Red","Blue","Green","Yellow","Purple","Orange"))
= Choose(First(Fields!uv_port_type.Value,
"dsUnitValues"),"Red","Blue","Green","Yellow","Purple","Orange")
= CStr(Choose(First(Fields!uv_port_type.Value,
"dsUnitValues"),"Red","Blue","Green","Yellow","Purple","Orange"))
(We also tried "IIF" statements.)
Thank you!
Jen
"Robert Bruckner [MSFT]" wrote:
> There might be multiple issues here:
> * A chart is similar to a matrix. Therefore a "cell" (datapoint) in a chart
> can actually contain multiple rows depending on the groupings applied. Using
> Fields!description.Value will always return the first value if multiple rows
> are present.
> If series groupings are present in the chart, you have to use
> =First(Fields!description.Value, "NameOfInnermostSeriesGrouping") to get the
> correct datapoint value in your expression. You might also want to check
> this thread:
> http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=15f4e34b-345a-4876-8cbe-734b9e4dfa53&sloc=en-us
> * Transparent is not a valid color. The only exceptions are currently the
> chart area and the plot area fill colors (it's on the wishlist for
> extensions in a future release).
> Since transparent is not valid color, it gets ignored and the default color
> (from the palette) applies. If you want to "hide" entire
> datapoints/categories, you can filter them. If you have a solid plotarea
> background color you could also assign the plotarea color to hide
> datapoints.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:917930D0-5D0E-4231-A6BD-1B58602D4D9F@.microsoft.com...
> > That makes sense,
> >
> > But still having an issue of what function to use in the fill color field.
> >
> > I have
> >
> > =IIf( Fields!descriptn.Value = "Self", "white","Transparent")
> >
> > But it seems to ingore it.
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> > > Keep in mind that expressions cannot be evaluated in design mode.
> > > From the SP1 Readme about chart enhancements:
> > >
> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
> > > "If you use an expression for fill color, the chart elements will be
> white
> > > in Layout view, but will display properly when the report is run."
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Matt" <Matt@.discussions.microsoft.com> wrote in message
> > > news:1AA68AB0-128E-44B2-8519-6357D7EBD465@.microsoft.com...
> > > > I'm trying to figure out how to create a custom series color in a bar
> > > chart,
> > > > and am unable to find documentation on it.
> > > >
> > > > I read a post here on trying the Choose() function in the fill color
> > > portion
> > > > of the series value, but my chart goes gray in the layout mode, and
> then
> > > in
> > > > the preview mode it just shows the default colors.
> > > >
> > > > Any documentation on this I can read?
> > >
> > >
> > >
>
>|||I found the following on SQLJunkies.. Seems to work:
--
Need a custom palette for your charts? Embed the function below into your
report, and set the Data > Values > Appearance > Series Style > Fill to the
custom function =Code.SetColor. Replace the nnnn's below with the hex codes
you need. See http://www.321webmaster.com/colorconverter.php for an RGB to
hex converter online. And hug the Reporting Services developers for adding
custom color functionality into SP1.
Function SetColor As String
Static ColorCode as Integer
ColorCode = ColorCode + 1: If ColorCode > 5 then ColorCode = 1
Select Case ColorCode
Case 1:
SetColor = "#00nnnn" ' Bluish
Case 2:
SetColor = "#78nnnn" ' Greenish
Case 3:
SetColor = "#E2nnnn" ' Reddish
Case 4:
SetColor = "#00nnnn" ' Navyish
Case 4:
SetColor = "#CCnnnn" ' Yellowish
Case 5:
SetColor = "#00nnnn" ' Light Blueish
Case Else:
SetColor = "#000000" ' Black (placeholder)
End Select
End Function
--
I have a where I need to show an average value in bar graph, but how many
values went into that average is also important. I pull back a percentage in
the query and then created a function that based on a percentage, returns a
color. Added =Code.FunctionName(pct) to the series fill and voila!
George
"Jen Rubin" wrote:
> We create one particular line chart in which the number of lines will be
> different based on what the user selects when printing the report. They graph
> the performance of their portfolio to that of 1-5 different indices. So the
> chart will have between 2 and 6 different lines on it.
> In the data tab of the chart, we have one item listed under values, one
> under category groups, and one under series groups.
> Everything works great. Our problem is that when there are so many lines
> that the chart uses a Green and LightGreen color for two of the lines, our
> client can't tell those two colors apart and wants us to use a different
> color than LightGreen.
> We have tried to use the various suggestions seen in this and other blogs to
> customize the color but it doesn't work.
> Can anyone help us? I can provide more info if needed.
> This is what we have tried under
> Edit Value=>Appearance=>Series Style=>Fill=>Color=>Expression:
> => Choose(Fields!uv_port_type.Value,"Red","Blue","Green","Yellow","Purple","Orange")
> => CStr(Choose(Fields!uv_port_type.Value,"Red","Blue","Green","Yellow","Purple","Orange"))
> = Choose(First(Fields!uv_port_type.Value,
> "dsUnitValues"),"Red","Blue","Green","Yellow","Purple","Orange")
> = CStr(Choose(First(Fields!uv_port_type.Value,
> "dsUnitValues"),"Red","Blue","Green","Yellow","Purple","Orange"))
> (We also tried "IIF" statements.)
> Thank you!
> Jen
>
> "Robert Bruckner [MSFT]" wrote:
> > There might be multiple issues here:
> > * A chart is similar to a matrix. Therefore a "cell" (datapoint) in a chart
> > can actually contain multiple rows depending on the groupings applied. Using
> > Fields!description.Value will always return the first value if multiple rows
> > are present.
> > If series groupings are present in the chart, you have to use
> > =First(Fields!description.Value, "NameOfInnermostSeriesGrouping") to get the
> > correct datapoint value in your expression. You might also want to check
> > this thread:
> > http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=15f4e34b-345a-4876-8cbe-734b9e4dfa53&sloc=en-us
> >
> > * Transparent is not a valid color. The only exceptions are currently the
> > chart area and the plot area fill colors (it's on the wishlist for
> > extensions in a future release).
> > Since transparent is not valid color, it gets ignored and the default color
> > (from the palette) applies. If you want to "hide" entire
> > datapoints/categories, you can filter them. If you have a solid plotarea
> > background color you could also assign the plotarea color to hide
> > datapoints.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> > "Matt" <Matt@.discussions.microsoft.com> wrote in message
> > news:917930D0-5D0E-4231-A6BD-1B58602D4D9F@.microsoft.com...
> > > That makes sense,
> > >
> > > But still having an issue of what function to use in the fill color field.
> > >
> > > I have
> > >
> > > =IIf( Fields!descriptn.Value = "Self", "white","Transparent")
> > >
> > > But it seems to ingore it.
> > >
> > > "Robert Bruckner [MSFT]" wrote:
> > >
> > > > Keep in mind that expressions cannot be evaluated in design mode.
> > > > From the SP1 Readme about chart enhancements:
> > > >
> > http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
> > > > "If you use an expression for fill color, the chart elements will be
> > white
> > > > in Layout view, but will display properly when the report is run."
> > > >
> > > > --
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > > "Matt" <Matt@.discussions.microsoft.com> wrote in message
> > > > news:1AA68AB0-128E-44B2-8519-6357D7EBD465@.microsoft.com...
> > > > > I'm trying to figure out how to create a custom series color in a bar
> > > > chart,
> > > > > and am unable to find documentation on it.
> > > > >
> > > > > I read a post here on trying the Choose() function in the fill color
> > > > portion
> > > > > of the series value, but my chart goes gray in the layout mode, and
> > then
> > > > in
> > > > > the preview mode it just shows the default colors.
> > > > >
> > > > > Any documentation on this I can read?
> > > >
> > > >
> > > >
> >
> >
> >

Custom Semi-Transparent bar charts?

I know that SSRS 2005 has a built-in semi-transparent color chart palette, but I'd like to define my own custom color semi-transparent palette.

Brian Welker's blog (https://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx) has a terrific post on how to create your own custom color palette, but it generates solid colors. How can it be tweaked to create semi-transparent colors? Is there another function that needs to be created to define the transparency of the color palette?

Thanks in advance,

Pete

Sorry, semi-transparency cannot be achieved by defining your own custom color palette.

There are CustomReportItem-based chart add ins available for RS from third parties (such as Dundas and ChartFX) which will enable that kind of functionality in RS 2005.

-- Robert

|||

Bummer.

Can images be used in charts? (I doubt it, but thought I'd inquire.)

Thanks,
Pete

|||

Yes, you can use an image as a background image for the chart plotarea (select the chart and look for the BackgroundImage property in the VS properties window).

-- Robert

|||

I should have made my followup question clearer. I meant to ask if images can be used in the actual charting of values, for example to use an image of coins for bar charts whereby the bars on the chart are actually a "stack" of the coins. Or to use an image that gets "stretched" on the bars of a bargraph.

--Pete

|||

I believe the plug-in from Dundas ("Dundas Charts for Reporting Services") supports this, but you would need to check with them. It is not supported out of the box with the built-in charts.

-- Robert

|||

Transparency is more than possible with ANY system palette or custom palette.
The trick (work-around whatever) lies in modifying the 'alpha' component of the colour for each series in the chart AFTER they have had their colour assigned to them.

ie. i used the code

//set the transparency of the series
if(_abstractChart.Options.Transparency > 0) {
//get the transparency as a percentage
double transPerc = _abstractChart.Options.Transparency / 100.00;
//Alpha value 255 is opaque, 0 is transparent. set the transparency as a % of 255
int alphaValue = (int) (255 * (1-transPerc));
_chart.ApplyPaletteColors();
foreach(Series series in _chart.Series) {
series.Color = Color.FromArgb(alphaValue, series.Color.R, series.Color.G, series.Color.B);
}
}

where
-abstractChart.Options.Transparency is the integer value (between 0 and 100 inclusive) denoting the transparent %.
-_chart is a Dundas.Charting.WebControl.Chart

in my C# application, a percentage value is retrieved from the user from an aspx form. I subtract the tranparent component of the alpha value from the max (255) to get the Opacity, which is what i set in the colour. Giving the user 101 grades of tranparency (no pun intended).

HOWEVER, i actually have a problem. Though this method works fine for bar chart, radar, area line charts, it DOES NOT work for pie charts. The semi-transparent palette works for pie charts, but this method does not.

Perhaps someone with more knowledge of the dundas system could use my solution in the right place to achieve transparency for pie charts?

please?

I thought maybe using this method in Customize, PrePaint or PostPaint event would work. Havent had the chance to try it yet.
Cheers

|||

Okay, i figured it out.
A bar chart has one series object in the Dundas.Charting.WebControl.Chart.Series[] of the chart for every bar, so setting the colour of the series would apply to the bar which that series plots.
A pie chart has one series object for the whole chart, and the slices are individual datapoints within that series.
The solution quite simply is to add another level to the loop which iterates through every datapoint of the current series.
If processing time is a concern there should be a check present for whether the second loop is necessary (so far i have only found it necessary within PIE charts)
if(abstractChart.Options.Transparency > 0) {
//get the transparency as a percentage
double transPerc = abstractChart.Options.Transparency / 100.00;
//Alpha value 255 is opaque, 0 is transparent. set the transparency as a % of 255
int alphaValue = (int) (255 * (1-transPerc));
chart.ApplyPaletteColors();
foreach(Series series in chart.Series) {
if(abstractChart.GetChartType != ChartType.Pie) {
series.Color = Color.FromArgb(alphaValue, series.Color.R, series.Color.G, series.Color.B);
}
else{
foreach(DataPoint dp in series.Points) {
dp.Color = Color.FromArgb(alphaValue, dp.Color.R, dp.Color.G, dp.Color.B);
}
}
}
}
Where
-abstractChart.Options.Transparency is the integer value (between 0 and 100 inclusive) denoting the transparent %.
-_chart is a Dundas.Charting.WebControl.Chart
-abstractChart.ChartType is an identifier for the type of chart we are plotting (Abstract Chart is one of MY classes, as is ChartType)

By the way, this code is called after the chart object has been created, but before returning from the method which created the chart object.
IE.
public Dundas.Charting.WebControl.Chart MakeChart(){
Dundas.Charting.WebControl.Chart chart = new Dundas.Charting.WebControl.Chart();
..
..
..
..
<transparency code>
..
..
..
return chart;
}
any questions?
LiLbUg@.ozemate.com

|||

just an out of topic question: sorry because i need an answer really fast hope you understand....

Hi everyone,

I just inquiring if the 'My subscription' toolbar at the upper right portion of the report manager can be removed? or shall we say hide... If possible, how to remove please help...

Another question is when you click the show details button, the option to delete and move appears but it is initially disabled...is there a way also to hide the move button?

thank you very much...hope to have any response or advice as soon as possible...thanks

|||

Hello Thor:

Interesting... I'm a little confused, though. Is your code affecting the Dundas charting component or are you suggesting a way to create charting transparency in reporting services without the need for a third party add-in like Dundas (or ChartFX)?

Thanks,

Pete

|||

hey pete

yeh, not sure what you mean, theres alot of syllables in some of those words.
To try to answer your question; i'm using dundas, and the code i supplied directly changes the colour value for datapoint objects/series objects inside a DUNDAS chart. IE i assign a new colour for each datapoint/series in the code, in this case the new colour is the same as the old one (which is assigned from the palette) except the alpha value has been changed.
effectively, any palette can therefore have transparency applied to it, retaining the oiginal colours of the palette.
SO... i think the answer to your question is that this code NEEDS dundas and i affect the instance of the dundas charting component to create transparency.
but technically this should work for any charting tool that allows you to modify the colour of the datapoints in a series after they have been assigned a colour and before they are drawn.
ps. last time i ran my app. it changed the colour for the whole pie chart to the colour of the first datapoint. i think this code would have to be in the PrePaint event (its worked there before).
ill post again when i know for sure.

...Edit...
just read the top post again, and realised you're not using dundas. for some reason i thought this was all about dundas.
anyways, this should work for that charting thing you use IF you can change the colours of the series / datapoints at the right time. Might take some experimenting to figure out where, or even if you can do it.

sql

Sunday, February 19, 2012

Custom Bar Chart colors?

I am also looking for a way to specify my own list of colors for bars in a
bar chart. Please let me know if anyone has a solution for this.
Thanks Again,
AndyHowdy,
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx
(Courtesy of Brian Welcker)
HTH,
Sean G.