sql - Change dynamically color line chart -


i have report reportingservices, have linechart. 1 series of chart have write expression color column of dataset.

=iif((sum(fields!productionactual.value, "chartdataset")-sum(fields!productionplanned.value, "chartdataset"))>0,"lightgreen","red") 

but see 1 color "red".

this query use create chart

declare @temporarytable table                          (                         workcenter nvarchar(100),                         time numeric,                         min datetime,                         max datetime,                         stopinminutes numeric,                         workingtime numeric                         )  -- po start , end time , linkupid declare @data_start datetime declare @data_end datetime declare @machine nvarchar(100)  declare @date datetime declare @dateend datetime set @date = '2014-11-24' set @dateend ='2014-11-26' declare @productionline nvarchar(100) set @productionline = 'combiner001'    set @data_start = @date set @data_end =dateadd(second,86399,@dateend)  set @machine= @productionline  --se nell elenco delle linee ho inserito la packer devo  --avere una diversa query   begin         --query valida per tutte le macchine - packer001     select              mc.equipment equipment           , convert (date, mc.createdon)  data           ,  sum(mc.quantity) production           , tc.plannedproduction productionplanned           , abs((sum(mc.quantity) - tc.plannedproduction)) productionvsplanned              [sqlimeltc\imeltcprod].[flexnet].[dbo].at_machine_counter mc left join         imelreporting.dbo.tc_plannedproduction tc on              mc.equipment = tc.workcenter ,             convert (date, mc.createdon) = convert (date, tc.planneddate) -- don't know if need second convert() function            mc.countertype = 1        , mc.createdon between @data_start ,  @data_end        , tc.planneddate between @data_start ,  @data_end                    , mc.equipment = @machine        , mc.createdon not null    group convert (date, mc.createdon), mc.equipment, tc.plannedproduction end 

this result of chart.

enter image description here

i expected have second column "red" , fourth column "lightgreen". have see, there error, because gray column have wrong value. have "3310" value, in realty should have "1000" , "2310"


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -