Showing posts with label colors. Show all posts
Showing posts with label colors. Show all posts

Thursday, March 8, 2012

CHECK constraint

I've asked this before, without answer (though msnews.microsoft.com seems to
not show everything).
Imagine:
CREATE colors (
colorid INT PRIMARY KEY,
description VARCHAR(20)
)
CREATE TABLE tables (
tableid INT PRIMARY KEY,
colorid INT FOREIGN KEY colors(colorid)
)
CREATE TABLE table_chairs (
chairid INT PRIMARY KEY,
colorid INT FOREIGN KEY colors(colorid),
goeswithtable INT FOREIGN KEY tables(tableid),
CHECK ( ...... )
)
Please don't question the layout of my database tables. This is just an
example to illustrate my question.
So in table_chairs, you have chairs that belong to (makes a nice set with) a
certain table.
I wish to add a check constraint to ensure that the colorid of the chairid
is equal to the colorid of the table.
I can not use TRIGGERS.. can this be done with CHECK constraints or are they
themselves constrained in that they can not reference other tables?
Lisathe easiest way is just not to have colorid in table_chairs at all -
you can retrieve it from tables.
Yet if you really need to have the redundant column (BTW why?), define
a unique constraint on tables(tableid , colorid ) and have a FK point
to it from table_chairs|||It's nto redundant..
The colorid in table_chairs describes the colorid of chairid. The colorid in
tables is the colorid of tables.
The idea is that blue chairs may only be linked to a blue table.
But I need to find a way to CHECK that the colorid of the table (in
table_chairs) matches the colorid of the table (tables), without using
triggers.. is it possible?
"Alexander Kuznetsov" <AK_TIREDOFSPAM@.hotmail.COM> wrote in message
news:1141851166.856693.323390@.v46g2000cwv.googlegroups.com...
> the easiest way is just not to have colorid in table_chairs at all -
> you can retrieve it from tables.
> Yet if you really need to have the redundant column (BTW why?), define
> a unique constraint on tables(tableid , colorid ) and have a FK point
> to it from table_chairs
>|||> is it possible?
*untested"
alter table tables add unique(tableid, colorid)
alter table table_chairs add foreign key(goeswithtable, colorid)
references tables(tableid, colorid)

Friday, February 24, 2012

chart series with different colors

hello, my english is not to well.
i Have a chart (columns) I need set de colors of my columns
How can a do that?
thanks !chart properties-> Data tab ->
Add values -> select that value -> click on Edit button
it will popup another window-> there select apperance tab-> there click on
series style button->it will popup another window -> there select your own
color
Regards,
Sri
"Lorein" wrote:
> hello, my english is not to well.
> i Have a chart (columns) I need set de colors of my columns
> How can a do that?
> thanks !|||Hello Sriman, thanks for your answer.
I don´t have that option in Data tab => values => Edit =>apperance
I am developing the report with Microsoft Visual Studio .Net 2003,
Perhaps for that reason I do not have the option, can be?
thanks again !!!!
Lorein.
"Sriman" wrote:
> chart properties-> Data tab ->
> Add values -> select that value -> click on Edit button
> it will popup another window-> there select apperance tab-> there click on
> series style button->it will popup another window -> there select your own
> color
> Regards,
> Sri
> "Lorein" wrote:
> > hello, my english is not to well.
> > i Have a chart (columns) I need set de colors of my columns
> > How can a do that?
> > thanks !

Chart Question

Hi,
I am kind of grouping some data into series.
My question is :
1. How can i change different colors for the series ? (1 color for each)
2. How can i adjust the space between one series and the other.
(right now they are evenly spced out and are very small to see)
Thanks
RP> 1. How can i change different colors for the series ? (1 color for each)
Hi RP,
Make sure that you have installed RS SP1 on the client and server side. When
you install SP1 on the client side you will have one extra button for
setting individual color for each data. You can find the button in chart
properties, tab Data. Select data series and click Edit. Then click
Appearance/Series Style... In the Fill tab you can control the color for
this data.
HTH,
--
Martin Kulov
http://www.codeattest.com/blogs/martin
MCAD Charter Member
MCSD.NET Early Achiever
MCSD|||Thanks Martin,
I installed SP2 and I see this button. I am still not sure how I can change
the color on a pie chart.
I am trying to change the color on each individual pie in the pie chart.
For example I have two inputs for the pie
Channel and Count
Channel1 - 100
Channel2 - 250
Channel3 - 400
how can I change colors on each pie which is Channel1, channel2 and
channel3'
Thank you for your help.
Chandra.
"Martin Kulov" <kulov@.bezbokluk.abv.bg> wrote in message
news:O9dZrIzgFHA.1148@.TK2MSFTNGP12.phx.gbl...
> > 1. How can i change different colors for the series ? (1 color for each)
> Hi RP,
> Make sure that you have installed RS SP1 on the client and server side.
When
> you install SP1 on the client side you will have one extra button for
> setting individual color for each data. You can find the button in chart
> properties, tab Data. Select data series and click Edit. Then click
> Appearance/Series Style... In the Fill tab you can control the color for
> this data.
> HTH,
> --
> Martin Kulov
> http://www.codeattest.com/blogs/martin
> MCAD Charter Member
> MCSD.NET Early Achiever
> MCSD
>

chart line style

Hi,
Could I change the line style for chart? The default chart lines are solid
with different colors. I'd like to change solid lines to dotted or dashed
lines. Could anybody know how to do it?
Thanks.
OliverMake sure you have RS 2000 SP2 installed.
Check section 4.2.10 of the Readme file for details about the added
capabilities to modify the style of line charts:
http://download.microsoft.com/download/5/1/3/513534ae-a0e7-44e6-9a04-ba3c549a5f5f/sp2Readme_EN.htm#_chart_enhancements
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Oliver" <Oliver@.discussions.microsoft.com> wrote in message
news:FD51D274-EAC7-4DA3-863B-E76667CCE89C@.microsoft.com...
> Hi,
> Could I change the line style for chart? The default chart lines are solid
> with different colors. I'd like to change solid lines to dotted or dashed
> lines. Could anybody know how to do it?
> Thanks.
> Oliver

Chart Legend Sorting

I have a chart where I need to sort the legend so the colors appear in the
same order as the colors on the chart. It appears the order the legend
labels appear in is fairly random. To get around this we have added a custom
image below the chart with the colors and label order we need to have,
however this does cause some other issues. Is there a method to what order
the legend labels will appear?
ThanksYou might try something along these lines:
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx.
--
Michael
"Monte" wrote:
> I have a chart where I need to sort the legend so the colors appear in the
> same order as the colors on the chart. It appears the order the legend
> labels appear in is fairly random. To get around this we have added a custom
> image below the chart with the colors and label order we need to have,
> however this does cause some other issues. Is there a method to what order
> the legend labels will appear?
> Thanks

Chart Interlacing Colors

For a given axis I can select to enable interlaced colors.
How do I select what the second, interlacing color is?
It appears to always be gray.
This is not ideal for the custom colors we have selected.
Thank you in advance.
JerryThe interlacing color is automatically determined based on the chart's
backgroundcolor or plotarea color (if they are explicitly set).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jerry Nixon" <jerrynixon@.gmail.com> wrote in message
news:36f558cf.0410111518.7670c91f@.posting.google.com...
> For a given axis I can select to enable interlaced colors.
> How do I select what the second, interlacing color is?
> It appears to always be gray.
> This is not ideal for the custom colors we have selected.
> Thank you in advance.
> Jerry

Sunday, February 19, 2012

Chart Colors

Hi,
I need to change the colors of my pie chart. The pie chart consists of five
pieces, which represent the severity of the piece (i.e, 30% of the users have
more than 5 problmes) so I need this piece to be red (no problems should be
green, for this matter). I can't seem to find a way to configure the colors
myself.
Any suggestions?You will need RS 2000 with SP1 or later. In that case, you can control the
color of data points based on an expression. Please check the "Chart Styles"
section under 4.1.3 in the SP1 Readme:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
An example is copied to the bottom of this posting. The example will
highlight all pie segments which have absolute values > 15 in red color.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Eyal S" <Eyal S@.discussions.microsoft.com> wrote in message
news:EB3EFF84-2A41-47F0-9AA2-FB291D9FB22C@.microsoft.com...
> Hi,
> I need to change the colors of my pie chart. The pie chart consists of
> five
> pieces, which represent the severity of the piece (i.e, 30% of the users
> have
> more than 5 problmes) so I need this piece to be red (no problems should
> be
> green, for this matter). I can't seem to find a way to configure the
> colors
> myself.
> Any suggestions?
============================================
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Chart Name="chart1">
<ThreeDProperties>
<Rotation>30</Rotation>
<Inclination>30</Inclination>
<Shading>Simple</Shading>
<WallThickness>50</WallThickness>
</ThreeDProperties>
<Style>
<BackgroundColor>White</BackgroundColor>
</Style>
<Legend>
<Visible>true</Visible>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>BottomCenter</Position>
<Layout>Table</Layout>
</Legend>
<Palette>Default</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!UnitsInStock.Value)</Value>
</DataValue>
</DataValues>
<DataLabel>
<Style />
<Visible>true</Visible>
</DataLabel>
<Style>
<BackgroundGradientEndColor>Black</BackgroundGradientEndColor>
<BackgroundColor>=iif(Sum(Fields!UnitsInStock.Value) >
15, "Red", Nothing)</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title />
<MajorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<Margin>true</Margin>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>Northwind</DataSetName>
<PointWidth>0</PointWidth>
<Type>Pie</Type>
<Top>0.125in</Top>
<Title />
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="chart1_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Fields!ProductName.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!ProductName.Value</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<Left>0.25in</Left>
<ValueAxis>
<Axis>
<Title />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>5in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>f029975b-69ee-431e-b75d-ece991d33884</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=(local);initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.5in</Width>
<DataSets>
<DataSet Name="Northwind">
<Fields>
<Field Name="ProductID">
<DataField>ProductID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="ProductName">
<DataField>ProductName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SupplierID">
<DataField>SupplierID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="CategoryID">
<DataField>CategoryID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="QuantityPerUnit">
<DataField>QuantityPerUnit</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="UnitPrice">
<DataField>UnitPrice</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="UnitsInStock">
<DataField>UnitsInStock</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="UnitsOnOrder">
<DataField>UnitsOnOrder</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="ReorderLevel">
<DataField>ReorderLevel</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="Discontinued">
<DataField>Discontinued</DataField>
<rd:TypeName>System.Boolean</rd:TypeName>
</Field>
<Field Name="CategoryName">
<DataField>CategoryName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="NullUnits">
<DataField>NullUnits</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT TOP 7 *, NULL AS NullUnits
FROM [Alphabetical list of products]
WHERE (UnitsOnOrder > 0)</CommandText>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>d0cefd8d-3b82-4f54-b1af-a9af24a270a5</rd:ReportID>
<BottomMargin>1in</BottomMargin>
</Report>

Chart Colors

Does anyone know of a way you can customise the colors used for different
series in a chart using Reporting Services. Or is there any way to create a
customised palette to use. There only appears to be a set group of colors to
choose from but I want to use specific colors for specific data series.Install RS 2000 SP1 if you have not yet done, and please read this section
in the SP1 readme about using colors in charts:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
You may also search this newsgroup for chart color related posting. You
should find several posted examples.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Joel Hines" <Joel Hines@.discussions.microsoft.com> wrote in message
news:E17477B8-A076-4113-AEF1-9A3B126D6ABA@.microsoft.com...
> Does anyone know of a way you can customise the colors used for different
> series in a chart using Reporting Services. Or is there any way to create
a
> customised palette to use. There only appears to be a set group of colors
to
> choose from but I want to use specific colors for specific data series.

Chart color palate

Does anyone know a way to gain control of the color palate to the point of
picking your own colors and/or patterns? Also even using data driven colors?
ThanksLook at this link:
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx
"mrmac" wrote:
> Does anyone know a way to gain control of the color palate to the point of
> picking your own colors and/or patterns? Also even using data driven colors?
> Thanks|||Thank you alot.

Chart Category Labels

How would I angle my category labels along the x axis of a Stacked Column
Chart. I can set the colors and and styles, but how do I go about making the
label or text sit at a 45 degree angle instead of vertical? Is there an
expression to place on the label property for the categories?This is currently not supported. It is under consideration for inclusion in
a future release.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Clint Jennings" <ClintJennings@.discussions.microsoft.com> wrote in message
news:613CADD4-2F13-469B-A1BA-EE25A02EAB1F@.microsoft.com...
> How would I angle my category labels along the x axis of a Stacked Column
> Chart. I can set the colors and and styles, but how do I go about making
the
> label or text sit at a 45 degree angle instead of vertical? Is there an
> expression to place on the label property for the categories?
>|||Thanks Robert.:)
"Robert Bruckner [MSFT]" wrote:
> This is currently not supported. It is under consideration for inclusion in
> a future release.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Clint Jennings" <ClintJennings@.discussions.microsoft.com> wrote in message
> news:613CADD4-2F13-469B-A1BA-EE25A02EAB1F@.microsoft.com...
> > How would I angle my category labels along the x axis of a Stacked Column
> > Chart. I can set the colors and and styles, but how do I go about making
> the
> > label or text sit at a 45 degree angle instead of vertical? Is there an
> > expression to place on the label property for the categories?
> >
>
>