Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Monday, March 19, 2012

Check for Duplicate Records Before Insertion

Hi,

Does anyone have any sugestions as to the best way to achieve the following?

I want to display a list of products in a GridView. Against each product I want to place a button which will add the product to a "wish list" table.

I need to be able to check that the product has not already been inserted into the wish list.

Either suggested methods or links to tutorials will be appreciated.

Thanks in advance.

Just do a;

SELECT ProductID FROM WishListTable WHERE ProductID = <selected Product ID>

If you don't get an empty result set back you know the product is already there. Or if you are using SQL Server Stored Procedures;

IF NOT EXISTS (SELECT 1 FROM WishListTable WHERE ProductID = <selected Product ID>) INSERT INTO WishListTable ...

|||

Thanks for your answer.

I started searching for a tutorial on this and found one athttp://aspalliance.com/687

I've incorporated your suggestion and the tutorial into my system and it works a treat.

Thanks again

check fields in select statement

hi,

I am getting some fields back from a select statement, how do you check one of the fields and display a string depending on what it is? Is there something like an if statement you can use? for example

select

field1,
field2 /*how do you check to see what it is here and display something depending on what it is*/

from
record

I am trying to see if field2 is a '' or empty string character

thxYou use a CASE statement.


SELECT field1, CASE field2 WHEN '' THEN 'BLANK' ELSE field2 END as Field2 FROM Table

If rather than '' the value might be null, you can use ISNULL


SELECT field1, ISNULL(field2,'BLANK') as field2 FROM Table
|||thank you for the help

Thursday, March 8, 2012

check box in parameters

How do I display check boxes in parameters.. I want the user to be able to
select multiple options that can be passed into the Query.. please help.
For example,
Select * from branch where branchregion in ('NORTHEAST','SOUTHWEST','
SOUTHEAST')..
RKSql Server 2000 Reporting Services does not directly support this
functionality. It is on our wish list for inclusion in a future release.
However there is an solution to this post on the GotDotNet.com web site:
http://www.gotdotnet.com/Community/Resources/Default.aspx?AFXPath=/Resource%5b@.ResourceId='2E882C0A-8D2B-4EAD-81BE-8E66C0941A18'%5d
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"RK Balaji" <rk.balaji@.gmail.com> wrote in message
news:ux5BwXHhEHA.4092@.TK2MSFTNGP10.phx.gbl...
> How do I display check boxes in parameters.. I want the user to be able to
> select multiple options that can be passed into the Query.. please help.
> For example,
> Select * from branch where branchregion in ('NORTHEAST','SOUTHWEST','
> SOUTHEAST')..
> RK
>
>
>

Wednesday, March 7, 2012

charts in excel

hello all,
i am a new user of excel 2007.i would like to display a chart when a particular cell is selected or cursor pointed to a cell in a report in which data came from ssas.how should i proceed for this ?do i need to code for this or in-built features help me to do so?i.e actually i wanted display chart along with the cells which overlaps with the cells and can be drilled down and drilled-up automatically.

You can use SSAS actions (should be accessible via right-click) to launch charting tools which access the SSAS data in the correct context, for example an SSRS report with URL parameters. Or do you instead wish to display a chart within Excel 2007 itself?

http://msdn2.microsoft.com/en-us/library/ms174515.aspx

>>

SQL Server 2005 Books Online

Actions

In Microsoft SQL Server 2005 Analysis Services, an action is a stored MDX statement that can be presented to and employed by client applications. In other words, an action is a client command that is defined and stored on the server. An action also contains information that specifies when and how the MDX statement should be displayed and handled by the client application. The operation that is specified by the action can start an application, using the information in the action as a parameter, or can retrieve information based on criteria supplied by the action.

...

>>

Saturday, February 25, 2012

Chart with 3 year series

Hello
I have a dataset with a date field and a value field. I wish to display the
value fields for current year as well as the previous 2 years together with
different colours on the same month interval on the X-axis. Can someone lend
a hand on how to do this?
thanks in advance
Chris PulfordExample is attached below. The basic idea is to group by months on the
categories and group by year on the series.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Chart Name="Sales">
<ThreeDProperties>
<Rotation>30</Rotation>
<Inclination>30</Inclination>
<Shading>Simple</Shading>
<WallThickness>50</WallThickness>
</ThreeDProperties>
<Style />
<Legend>
<Visible>true</Visible>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<Color>Brown</Color>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Pastel</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!UnitPrice.Value *
Fields!Quantity.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Style>
<BorderWidth>
<Default>6pt</Default>
</BorderWidth>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Marker />
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title>
<Style />
</Title>
<Style />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>Northwind</DataSetName>
<PointWidth>100</PointWidth>
<Type>Line</Type>
<Title>
<Caption>Sales</Caption>
<Style>
<FontSize>14pt</FontSize>
<FontWeight>700</FontWeight>
</Style>
</Title>
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="Sales_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Month(Fields!OrderDate.Value)</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Month(Fields!OrderDate.Value)</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<Label>=MonthName(Month(Fields!OrderDate.Value))</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Height>6.125in</Height>
<SeriesGroupings>
<SeriesGrouping>
<DynamicSeries>
<Grouping Name="Sales_SeriesGroup1">
<GroupExpressions>
<GroupExpression>=Year(Fields!OrderDate.Value)</GroupExpression>
</GroupExpressions>
</Grouping>
<Label />
</DynamicSeries>
</SeriesGrouping>
<SeriesGrouping>
<StaticSeries>
<StaticMember>
<Label>Sales</Label>
</StaticMember>
</StaticSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundGradientEndColor>White</BackgroundGradientEndColor>
<BackgroundGradientType>TopBottom</BackgroundGradientType>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<ValueAxis>
<Axis>
<Title>
<Style />
</Title>
<Style />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<MinorTickMarks>Outside</MinorTickMarks>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>6.5in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>da5964d0-11a7-4e51-9b22-cc4fa55fdd7a</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="UnitPrice">
<DataField>UnitPrice</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Quantity">
<DataField>Quantity</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="OrderDate">
<DataField>OrderDate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT [Order Details].UnitPrice, [Order
Details].Quantity, Orders.OrderDate
FROM Orders INNER JOIN
[Order Details] ON Orders.OrderID = [Order
Details].OrderID</CommandText>
<Timeout>30</Timeout>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>bc811835-2302-4f9e-9c89-a99d4d3f5fd2</rd:ReportID>
<BottomMargin>1in</BottomMargin>
</Report>

Friday, February 24, 2012

Chart problem

I am displaying a chart in crystal report. In this chart/graph on the vertical data axis i have values in the format like 0.00. Now I want to display this value in the format 0:00, i.e. I want to replace the period(.) with a colon.

I am not getting any solution for this. Also I have a field label on the top of the graph which is formula. In this also I have the same problem.

I can get a colon in the Time format but it is disturbing the number system of the graph.

Need a solution.I have a similar problem at the moment; my dates on the horizontal axis are in the standard DD/MM/YYYY format, whereas I need DD.MM.YYYY. I don't think Crystal Graphing tool is powerful enough to do this, but I did find that I could make it appear this way by changing my computer's regional settings.

Hope this is of some help to you.|||Yes, even I think that crystal is not capable of such a thing.
Thanks for your input anyway.

Chart Problem

I want to display numeric value like 1,2,3,4,5 on X'Axis in Column Graph how to do this?I have GroupName on X'Axis.but i do not want to show id of tht GroupName on X'Axis.I want to show statuc numeric value in SQl server 2005 SSRS.
Can anyone help Me?
Thanks
Care Career
From http://www.developmentnow.com/g/115_2004_12_0_6_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comHi
Turn off your axis labels and create a table item to display what you
need. Look at my reply in this post
http://groups.google.com.au/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/e9c478240484b44a/ad757ca86965ed0e?hl=en&lnk=st&q=#ad757ca86965ed0e
Cheers
Shai
On Nov 19, 10:18 pm, Care Career<vertex.vibha.gro...@.hotmail.com>
wrote:
> I want to display numeric value like 1,2,3,4,5 on X'Axis in Column Graph how to do this?I have GroupName on X'Axis.but i do not want to show id of tht GroupName on X'Axis.I want to show statuc numeric value in SQl server 2005 SSRS.
> Can anyone help Me?
> Thanks
> Care Career
> Fromhttp://www.developmentnow.com/g/115_2004_12_0_6_0/sql-server-reportin...
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com

Sunday, February 19, 2012

Chart does not display when Toolbar=False

I have a basic bar chart that runs fine on a local 32 bit server both within an IFRAME and within the reports manager. However, on another server that is brand new and clean install of SQL Server 2005 (64 bit) that same chart will run fine within reports manager but not through a direct link (whether in an IFRAME or not).

I narrowed the problem down to the parameter Toolbar=False. If I leave off that parameter, the report runs fine but includes the header. If I set the parameter to True, it also displays fine with a direct link. I can also specify Parameters=False and that works fine. However, no matter what I try, setting Toolbar=False returns a report (showing text in textboxes) but the chart itself returns as an image placeholder with the little red x.

Obviously, I do not want the user to see the toolbar within the application. I tried looking at the logs and event viewer for clues and found nothing.

Can someone please help?

Well it appears I have run across a bug: http://support.microsoft.com/?kbid=921405

Why would Microsoft not release this hotfix without having to call them if it is a known problem when not in anonymous mode and should have been included in the latest hotfix post-SP1 rollup release?

Does anyone know where I might can simply get this hotfix?

Chart display fails when XCopy

When I copy the rdl file to the production server, the report runs but fails
to display the chart (displays the little icon). Any ideas? Thanks.
DanHi Dan,
Thanks for your post.
From your descriptions, I understood you could see Chart well on VS.NET but
failed to see it after the deployment. If I have misunderstood your
concern, please feel free to point it out.
Based on my knowledge, This can be caused by the boundaries of the Chart
control. Make sure it's outer edges don't go outside the page and Move the
chart boundaries around and re-deploying the report until it looks right.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.

chart bar/column color

I want to display a column or bar in red if the value needs to be highlited.
Is that possible?
DougSPlease see the attached example. You'll need SP1 to use this feature.
1. Pull up the report in report designer
2. Go to Chart Properties dialog -> Data tab
3. Click the Value -> Edit Value button
4. Go to the Appearance tab in Edit Chart Value dialog
5. Click on the Series Style button
6. Go to the Fill tab in the Style Properties dialog
7. Modify the expresion for Color property accordingly (it is set to =iif(
Fields!price.Value < 15.0, "Red", "Blue"))
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
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>
<DrawingStyle>Cylinder</DrawingStyle>
</ThreeDProperties>
<Style>
<BackgroundColor>White</BackgroundColor>
</Style>
<Legend>
<Visible>true</Visible>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Default</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!price.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Style>
<BackgroundColor>=iif( Fields!price.Value < 15.0,
"Red", "Blue")</BackgroundColor>
</Style>
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title />
<Style>
<FontSize>8pt</FontSize>
</Style>
<MajorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Min>0</Min>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>pubs</DataSetName>
<PointWidth>0</PointWidth>
<Type>Column</Type>
<Title />
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="chart1_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Fields!title.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!title.Value</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<ValueAxis>
<Axis>
<Title />
<Style>
<Format>C2</Format>
<FontSize>8pt</FontSize>
</Style>
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>4.75in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="pubs">
<rd:DataSourceID>d743d813-756c-4688-850b-f2e6deda54b0</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>initial catalog=pubs</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>7.125in</Width>
<DataSets>
<DataSet Name="pubs">
<Fields>
<Field Name="title_id">
<DataField>title_id</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="title">
<DataField>title</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="type">
<DataField>type</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="pub_id">
<DataField>pub_id</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="price">
<DataField>price</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="advance">
<DataField>advance</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="royalty">
<DataField>royalty</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="ytd_sales">
<DataField>ytd_sales</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="notes">
<DataField>notes</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="pubdate">
<DataField>pubdate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>pubs</DataSourceName>
<CommandText>select * from titles</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>7a57b47c-d471-411b-abea-bc7acc3f1a16</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Doug Stiers" <doug@.nospam.com> wrote in message
news:OnIJW8laEHA.2516@.TK2MSFTNGP10.phx.gbl...
> I want to display a column or bar in red if the value needs to be
highlited.
> Is that possible?
> DougS
>|||Thanks, that works really well.
Doug
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:%23Ub6MJnaEHA.1840@.TK2MSFTNGP11.phx.gbl...
> Please see the attached example. You'll need SP1 to use this feature.
> 1. Pull up the report in report designer
> 2. Go to Chart Properties dialog -> Data tab
> 3. Click the Value -> Edit Value button
> 4. Go to the Appearance tab in Edit Chart Value dialog
> 5. Click on the Series Style button
> 6. Go to the Fill tab in the Style Properties dialog
> 7. Modify the expresion for Color property accordingly (it is set to =iif(
> Fields!price.Value < 15.0, "Red", "Blue"))
> <?xml version="1.0" encoding="utf-8"?>
> <Report
>
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
> tion"
>
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>
> <DrawingStyle>Cylinder</DrawingStyle>
> </ThreeDProperties>
> <Style>
> <BackgroundColor>White</BackgroundColor>
> </Style>
> <Legend>
> <Visible>true</Visible>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> <Position>RightCenter</Position>
> </Legend>
> <Palette>Default</Palette>
> <ChartData>
> <ChartSeries>
> <DataPoints>
> <DataPoint>
> <DataValues>
> <DataValue>
> <Value>=Sum(Fields!price.Value)</Value>
> </DataValue>
> </DataValues>
> <DataLabel />
> <Style>
> <BackgroundColor>=iif( Fields!price.Value < 15.0,
> "Red", "Blue")</BackgroundColor>
> </Style>
> <Marker>
> <Size>6pt</Size>
> </Marker>
> </DataPoint>
> </DataPoints>
> </ChartSeries>
> </ChartData>
> <CategoryAxis>
> <Axis>
> <Title />
> <Style>
> <FontSize>8pt</FontSize>
> </Style>
> <MajorGridLines>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </MajorGridLines>
> <MinorGridLines>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </MinorGridLines>
> <MajorTickMarks>Outside</MajorTickMarks>
> <Min>0</Min>
> <Visible>true</Visible>
> </Axis>
> </CategoryAxis>
> <DataSetName>pubs</DataSetName>
> <PointWidth>0</PointWidth>
> <Type>Column</Type>
> <Title />
> <CategoryGroupings>
> <CategoryGrouping>
> <DynamicCategories>
> <Grouping Name="chart1_CategoryGroup1">
> <GroupExpressions>
> <GroupExpression>=Fields!title.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Label>=Fields!title.Value</Label>
> </DynamicCategories>
> </CategoryGrouping>
> </CategoryGroupings>
> <Subtype>Plain</Subtype>
> <PlotArea>
> <Style>
> <BackgroundColor>LightGrey</BackgroundColor>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </PlotArea>
> <ValueAxis>
> <Axis>
> <Title />
> <Style>
> <Format>C2</Format>
> <FontSize>8pt</FontSize>
> </Style>
> <MajorGridLines>
> <ShowGridLines>true</ShowGridLines>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </MajorGridLines>
> <MinorGridLines>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </MinorGridLines>
> <MajorTickMarks>Outside</MajorTickMarks>
> <Min>0</Min>
> <Margin>true</Margin>
> <Visible>true</Visible>
> <Scalar>true</Scalar>
> </Axis>
> </ValueAxis>
> </Chart>
> </ReportItems>
> <Style />
> <Height>4.75in</Height>
> </Body>
> <TopMargin>1in</TopMargin>
> <DataSources>
> <DataSource Name="pubs">
> <rd:DataSourceID>d743d813-756c-4688-850b-f2e6deda54b0</rd:DataSourceID>
> <ConnectionProperties>
> <DataProvider>SQL</DataProvider>
> <ConnectString>initial catalog=pubs</ConnectString>
> <IntegratedSecurity>true</IntegratedSecurity>
> </ConnectionProperties>
> </DataSource>
> </DataSources>
> <Width>7.125in</Width>
> <DataSets>
> <DataSet Name="pubs">
> <Fields>
> <Field Name="title_id">
> <DataField>title_id</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="title">
> <DataField>title</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="type">
> <DataField>type</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="pub_id">
> <DataField>pub_id</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="price">
> <DataField>price</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> <Field Name="advance">
> <DataField>advance</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> <Field Name="royalty">
> <DataField>royalty</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="ytd_sales">
> <DataField>ytd_sales</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="notes">
> <DataField>notes</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="pubdate">
> <DataField>pubdate</DataField>
> <rd:TypeName>System.DateTime</rd:TypeName>
> </Field>
> </Fields>
> <Query>
> <DataSourceName>pubs</DataSourceName>
> <CommandText>select * from titles</CommandText>
> <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> </Query>
> </DataSet>
> </DataSets>
> <LeftMargin>1in</LeftMargin>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <rd:DrawGrid>true</rd:DrawGrid>
> <rd:ReportID>7a57b47c-d471-411b-abea-bc7acc3f1a16</rd:ReportID>
> <BottomMargin>1in</BottomMargin>
> <Language>en-US</Language>
> </Report>
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Doug Stiers" <doug@.nospam.com> wrote in message
> news:OnIJW8laEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > I want to display a column or bar in red if the value needs to be
> highlited.
> > Is that possible?
> >
> > DougS
> >
> >
>

Chart Axis Scaling - labelling every 5 points

Hi,
I have alot of trend data to display on a chart. The x-axis is used for
dates. However not only dont I need to display all the labels but they
clutter the chart.
Is there a way of only displaying every 5th date?
I tried using the following expression for the label colour but it didnt
work:-
=Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
Many thanks in advance for any help,
Steve.Please see this related posting:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=05353b5e-f780-406c-9da8-cd4a26bc8e09&sloc=en-us
In your case you should set the major interval of the x-axis to 5 (i.e.
interval of 5 days)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"fisab" <fisab@.discussions.microsoft.com> wrote in message
news:AFEE1ACE-4CAD-4682-99BF-AD7872CAE024@.microsoft.com...
> Hi,
> I have alot of trend data to display on a chart. The x-axis is used for
> dates. However not only dont I need to display all the labels but they
> clutter the chart.
> Is there a way of only displaying every 5th date?
> I tried using the following expression for the label colour but it didnt
> work:-
> =Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
> Many thanks in advance for any help,
> Steve.
>|||Thanks. Appreciate the help.
"Robert Bruckner [MSFT]" wrote:
> Please see this related posting:
> http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=05353b5e-f780-406c-9da8-cd4a26bc8e09&sloc=en-us
> In your case you should set the major interval of the x-axis to 5 (i.e.
> interval of 5 days)
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "fisab" <fisab@.discussions.microsoft.com> wrote in message
> news:AFEE1ACE-4CAD-4682-99BF-AD7872CAE024@.microsoft.com...
> > Hi,
> > I have alot of trend data to display on a chart. The x-axis is used for
> > dates. However not only dont I need to display all the labels but they
> > clutter the chart.
> > Is there a way of only displaying every 5th date?
> > I tried using the following expression for the label colour but it didnt
> > work:-
> > =Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
> >
> > Many thanks in advance for any help,
> >
> > Steve.
> >
>
>

Thursday, February 16, 2012

Chart - X Axis

Can the labels on the x axis be rotated so that they display vertically. The
user wants a report that shows the month-year like May-2005, but with the
text rotated 90 degrees.The text orientation is determined automatically based on the horizontal
space available.
If you show many months along the X-axis, the labels will most likely not
fit horizontally (in one line or two lines) and will therefore get rotated.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chip Kaufman" <Chip Kaufman@.discussions.microsoft.com> wrote in message
news:B0E10C60-07E2-416F-8487-122E2151BB1E@.microsoft.com...
> Can the labels on the x axis be rotated so that they display vertically.
> The
> user wants a report that shows the month-year like May-2005, but with the
> text rotated 90 degrees.

Friday, February 10, 2012

Changing the value of the Database Field?

Hi all,

I'm working on Crystal reports in VS2005.

My database fields got the values in integer format whereas I want to display some string instead.
for example... if the database field value is 0, I must display "No Value" and for 1, "Low", for 2, "High".... so on!

I've been trying this using formula fields. But I couldn't get the correct results. the text of the formula fields is not varying according to the database field value.

So, how can I display a value based on the database field value instead of the database field value itself??

Pls help me solving this prob out!

Thank you.What do you currently have as your formula?
Also, look at the help for 'case' or 'switch'.|||Actually, select expressions are more what you're after, like

Select {table.field}
Case 0:
'No Value'
Case 1:
'Low'
Case 2:
'High'
...and so on
default: 'Unknown!';|||I dont know if this works out in your case but you can give a try
right click and select format field
click on the formula editor for suppress
write the formula
if
{dbfield i.e your field} = o then no value else if

{dbfield i.e your field} = 1 then low value else if

{dbfield i.e your field} = 2 then high value.

should work

do reply if it works...
regards|||I dont know if this works out in your case but you can give a try
right click and select format field
click on the formula editor for suppress
write the formula
if
{dbfield i.e your field} = o then no value else if

{dbfield i.e your field} = 1 then low value else if

{dbfield i.e your field} = 2 then high value.

should work

do reply if it works...
regards

Hi...

It worked out, but not with the exact format! I used UnboundString Field and inserted a formula in it for every Database field in my table. My formula contains something similar to what you've suggested!

Any way... I got the result in time and thank you very much for the reply!!