Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Interval bar chart

Author  Topic 

moodi_z
Starting Member

38 Posts

Posted - 2009-01-28 : 04:48:24
Hi,

I need to build a report that displays a production summary acording to many parameters.
One of those parameters is an interval that determind how to show the bar chart. That means if the user select "Day" for example then I need to show a bar chart for each day in the range that he entered.
(All days in one bar chart devided by day)
The same for choosing: Week / Month / Year / Quarter.

I hope that I was clear enough... Please help!

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-28 : 05:57:05
You mean a "Gantt" chart?


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-30 : 12:50:17
i think what you need is an expression in category group based on parameter value. something like
=Switch(Parameter!yourparam.value="Week",Fields!Week.value,Parameter!yourparam.value="Day",Fields!day.valkue,....)
Go to Top of Page

moodi_z
Starting Member

38 Posts

Posted - 2009-02-02 : 09:41:55
yeh I succeded by putting this code in the group field:

=Switch(
Parameters!Interval.Value=1, WeekdayName(DatePart("w",Fields!FromDate.Value)) & " " & DatePart("d",Fields!FromDate.Value) & "/" & DatePart("m",Fields!FromDate.Value),
Parameters!Interval.Value=2, "Week " & DatePart("w",Fields!FromDate.Value),
Parameters!Interval.Value=3, MonthName(DatePart("m",Fields!FromDate.Value)),
Parameters!Interval.Value=4, "Quarter " & DatePart("q",Fields!FromDate.Value),
Parameters!Interval.Value=5, DatePart("yyyy",Fields!FromDate.Value)
)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-02 : 09:45:25
cheers
Go to Top of Page

moodi_z
Starting Member

38 Posts

Posted - 2009-02-02 : 09:49:13
Thank you :)
Go to Top of Page
   

- Advertisement -