Showing posts with label charts. Show all posts
Showing posts with label charts. Show all posts

Tuesday, March 20, 2012

Number of charts vary with respect to a parameter

Hi

I have a situation similar to this example - The X Axis represents the Date and the Y Axis represents the number of vehicles sold and the data i need to represent is the type of each vehicle(Line Graph). Hence there should be one graph for each Vehicle type. Is it possible to generate as many Chart Objects in the rdl file dynamically.

I tried representing all the lines in a single chart but the since the sales value is varied as an example for a particular vehicle type it shall vary from 10000 to 1000000 and for another it varies from 10 to 100. So one vehicle type gets represented clearly and the other looks like a straight line.

Please help with the solution.

Thanks

Saishyam

> Hence there should be one graph for each Vehicle type.

Ok, let's assume you have a VehicleType field. Steps:
1. Add a list to the report
2. Add a list grouping based on the expression: =Fields!VehicleType.Value
This will create one list instance per vehicle type.
3. Add a chart into the list (make sure the chart is really contained within the list instead of overlaying)
4. Design your chart

You should then get one chart per vehicle type at runtime.

-- Robert

|||

Hi Robert

Thanks for the reply, I feel it will definitely help me out. Also will the layout be automatically taken care or should i code for that also.

|||

Not sure what you mean exactly with "layout", but if you leave the y-axis maximum value blank, the individual charts will automatically scale the y-axis based on the actual data values.

-- Robert

Monday, March 19, 2012

number formatting w/in charts and colors

1) How do you format numbers within charts. My numbers are currently without
commas (ex. 20000) and decimals with no formattting ( example: 679.8906890).
I would like them to be prettier with commas ( 20,000) and just 2 decimal
places ( 679.89) , respectively.
2) How do I assign colors to certain data values on my charts?
Please help...thank you.
Sincerely,
AllisonOn your first question: Pull up Chart properties dialog, go to Y-axis tab,
and type in c2 for Format Code.
On your second question: Pull up Chart properties dialog, go to Data tab ->
Edit button -> Point Labels tab -> Check Show Point Labels checkbox -> Click
on the Label Style button. You can then choose color, font, etc. for your
data labels. You can use an expression for Color as follows: =iif(
Fields!UnitPrice.Value <= 400.0, "Orange", "Green")
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ha Vo" <ha.vo@.prometheuslabs.com> wrote in message
news:OMhiwxLdEHA.2408@.tk2msftngp13.phx.gbl...
> 1) How do you format numbers within charts. My numbers are currently
without
> commas (ex. 20000) and decimals with no formattting ( example:
679.8906890).
> I would like them to be prettier with commas ( 20,000) and just 2 decimal
> places ( 679.89) , respectively.
> 2) How do I assign colors to certain data values on my charts?
> Please help...thank you.
> Sincerely,
> Allison
>

Wednesday, March 7, 2012

Null values in line charts

Hello,
I use the RS to charting some blood tests results (i work in an hospital).
These results have:
Date:DateTime
Results:Int
At a specific Date one blood test has not a result (in database is NULL).
The problem is that in line chart this appear as 0 values (this is very bad
for our patient-for doctors this mean something about the patient health).
My table
Date Test1Result Test2Result
12.02.2004 125 34
16.04.2004 NULL 25
18.08.2004 128 NULL
In the report i have 2 line charts 1 for test1result and 1 for test2resolt.
The doctors must see both charts. How to hide this 0 values (something like
Excel with zero values)
Thank youIn the field (or textbox) in which the value displays (the zero you
dont want) - Change the expression to say:
IIF(IsDbNull(Fields!Test1Result.Value) = True, (whatever value you want
to return instead of zero), Fields!Test1Result.Value)
Optionally - if this is from a Stored Procedure you could change the
Procedure to replace NULLS with someother more useful value.
The context here is a little vague.. I hope this helps.|||Thank you for your help. I can't insert any value here because this reflect
the patient healt state.
"papaboom" wrote:
> In the field (or textbox) in which the value displays (the zero you
> dont want) - Change the expression to say:
> IIF(IsDbNull(Fields!Test1Result.Value) = True, (whatever value you want
> to return instead of zero), Fields!Test1Result.Value)
> Optionally - if this is from a Stored Procedure you could change the
> Procedure to replace NULLS with someother more useful value.
> The context here is a little vague.. I hope this helps.
>|||Please read this thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=a3bce317-0626-47f4-9ec2-aebe559a41b3&sloc=en-us
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"cleo_mihai" <cleo_mihai@.discussions.microsoft.com> wrote in message
news:DDCBA342-D771-4868-8009-5FC30D5ECB26@.microsoft.com...
> Hello,
> I use the RS to charting some blood tests results (i work in an hospital).
> These results have:
> Date:DateTime
> Results:Int
> At a specific Date one blood test has not a result (in database is NULL).
> The problem is that in line chart this appear as 0 values (this is very
bad
> for our patient-for doctors this mean something about the patient health).
> My table
> Date Test1Result Test2Result
> 12.02.2004 125 34
> 16.04.2004 NULL 25
> 18.08.2004 128 NULL
> In the report i have 2 line charts 1 for test1result and 1 for
test2resolt.
> The doctors must see both charts. How to hide this 0 values (something
like
> Excel with zero values)
> Thank you
>|||Hy,
After 5 months and sp2 of RS, is time to try to solve my problem (unsolved
yet).
First, because the 0 value can't appear without a reason (this value
represent something-(eventually the patient's health status is bad)- i can't
replace the null's with any value (or 0). I can not decide if patient health
is good or bad. This must be a result from laboratory.
Second, is so complicated in RS to hide the null values? In Excel is easy
"Plot empty cells as: Interpolated".
If this is impossible in RS please let me know, to look for other charting
solutions.
Thank you very much for your time,
"cleo_mihai" wrote:
> Hello,
> I use the RS to charting some blood tests results (i work in an hospital).
> These results have:
> Date:DateTime
> Results:Int
> At a specific Date one blood test has not a result (in database is NULL).
> The problem is that in line chart this appear as 0 values (this is very bad
> for our patient-for doctors this mean something about the patient health).
> My table
> Date Test1Result Test2Result
> 12.02.2004 125 34
> 16.04.2004 NULL 25
> 18.08.2004 128 NULL
> In the report i have 2 line charts 1 for test1result and 1 for test2resolt.
> The doctors must see both charts. How to hide this 0 values (something like
> Excel with zero values)
> Thank you
>|||Are you sure you have tried this on SP2? Empty data points (i.e. value =Nothing) in line and area charts will be ignored and "interpolated".
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"cleo_mihai" <cleomihai@.discussions.microsoft.com> wrote in message
news:9B015D0A-BB60-4615-8410-91F11832E3FD@.microsoft.com...
> Hy,
> After 5 months and sp2 of RS, is time to try to solve my problem (unsolved
> yet).
> First, because the 0 value can't appear without a reason (this value
> represent something-(eventually the patient's health status is bad)- i
> can't
> replace the null's with any value (or 0). I can not decide if patient
> health
> is good or bad. This must be a result from laboratory.
> Second, is so complicated in RS to hide the null values? In Excel is easy
> "Plot empty cells as: Interpolated".
> If this is impossible in RS please let me know, to look for other charting
> solutions.
> Thank you very much for your time,
>
> "cleo_mihai" wrote:
>> Hello,
>> I use the RS to charting some blood tests results (i work in an
>> hospital).
>> These results have:
>> Date:DateTime
>> Results:Int
>> At a specific Date one blood test has not a result (in database is NULL).
>> The problem is that in line chart this appear as 0 values (this is very
>> bad
>> for our patient-for doctors this mean something about the patient
>> health).
>> My table
>> Date Test1Result Test2Result
>> 12.02.2004 125 34
>> 16.04.2004 NULL 25
>> 18.08.2004 128 NULL
>> In the report i have 2 line charts 1 for test1result and 1 for
>> test2resolt.
>> The doctors must see both charts. How to hide this 0 values (something
>> like
>> Excel with zero values)
>> Thank you