lalakeyorai
Technical User
Hello all, this is me again and i desperately need help. This is my situation:
I'm trying to create a pie chart with 3 data where:
Data A (total time for 'Down') and Data B (total time for 'Unresponsive') and;
Data C (the total time without the occurence of Down and Unresponsive for the day). so, basiclly the formula would be like:
Data C=[1 Day-(Data A + Data B)] and i would like to show these 3 data inside the pie chart. Please be note the total will be in second (number format).
Currently, i'm able to show total time for Data A and Data B in the chart with the following syntax by select Sum@1st_syntax for Show Value in the Chart Expert.
1st_syntax
local datetimevar status;
local numbervar diff;
{Event.Event_Status}='Active' or
({Event.Event_Status}='Clear' and
(onfirstrecord or
{Event.Device}<>previous({Event.Device})));
status:= if ({Event.Event_Name}= 'Down' or {Event.Event_Name}= 'Unresponsive')
and previous({Event.Event_Status})='Active' and {Event.Event_Status}='Clear' then {@Update Time};
diff:= datediff("s",previous({@Update Time}), status);
Next, is the shared variable syntax that i use to get the total time for Data C. The syntax is correct since when I drag it into the report, it displays the correct time total. The shared variable is actually same with 1st_syntax, i only changed the variable name.
2nd_syntax
shared numbervar total_diff;
shared numbervar totall_diff2;
total_diff2:=(86400)-total_diff; //total_diff is the sum of Down and Unresponsive time.syntax same with 1st_syntax
total_diff2;
My problem is I dont know how to make these 3 data appear in 3 slices inside the same pie chart. I cannot shared variable the 2nd_syntax with the 1st_syntax or otherwise the syntax will be disappeared from Available Fields list in the Chart Expert. I'm not using any subreport in my report. Can anybody please help me on how can I show Data C together with Data A and Data B inside my chart.
Thanks in advance.
I'm trying to create a pie chart with 3 data where:
Data A (total time for 'Down') and Data B (total time for 'Unresponsive') and;
Data C (the total time without the occurence of Down and Unresponsive for the day). so, basiclly the formula would be like:
Data C=[1 Day-(Data A + Data B)] and i would like to show these 3 data inside the pie chart. Please be note the total will be in second (number format).
Currently, i'm able to show total time for Data A and Data B in the chart with the following syntax by select Sum@1st_syntax for Show Value in the Chart Expert.
1st_syntax
local datetimevar status;
local numbervar diff;
{Event.Event_Status}='Active' or
({Event.Event_Status}='Clear' and
(onfirstrecord or
{Event.Device}<>previous({Event.Device})));
status:= if ({Event.Event_Name}= 'Down' or {Event.Event_Name}= 'Unresponsive')
and previous({Event.Event_Status})='Active' and {Event.Event_Status}='Clear' then {@Update Time};
diff:= datediff("s",previous({@Update Time}), status);
Next, is the shared variable syntax that i use to get the total time for Data C. The syntax is correct since when I drag it into the report, it displays the correct time total. The shared variable is actually same with 1st_syntax, i only changed the variable name.
2nd_syntax
shared numbervar total_diff;
shared numbervar totall_diff2;
total_diff2:=(86400)-total_diff; //total_diff is the sum of Down and Unresponsive time.syntax same with 1st_syntax
total_diff2;
My problem is I dont know how to make these 3 data appear in 3 slices inside the same pie chart. I cannot shared variable the 2nd_syntax with the 1st_syntax or otherwise the syntax will be disappeared from Available Fields list in the Chart Expert. I'm not using any subreport in my report. Can anybody please help me on how can I show Data C together with Data A and Data B inside my chart.
Thanks in advance.