Apply conditional formatting for two condition's
I have 6 columns in my Database,
WorkoutActual
TimeWorkedActual
Level_1_5_Service_Desk_Agent_Ext_RDM
Agents
AHT_Logic_NR
AHT_Logic_Dr
I m using Matrix Report and I have Sub-Total and Grand Toatl calculation for this report.
Report Condtion:
I have to use 2 conditions in the report,
If
WorkoutActual
TimeWorkedActual is NULL ,
Then we have to check for Sum (Level_1_5_Service_Desk_Agent_Ext_RDM+Agents) is not eaqul to Zero,
Then apply formula,
(AHT_Logic_NR / AHT_Logic_Dr)
I have written a Condition,
"=
iif(isnothing(sum(Fields!WorkoutActual.Value)) or isnothing(sum(Fields!TimeWorkedActual.Value)) ,
iif(iif(isNothing(sum(Fields!Level_1_5_Service_Desk_Agent_Ext_RDM.Value)+sum(Fields!Agents.Value)),0,
sum(Fields!Level_1_5_Service_Desk_Agent_Ext_RDM.Value)+sum(Fields!Agents.Value))<>0,
((sum(Fields!AHT_Logic_NR.Value)/
(sum(Fields!AHT_Logic_Dr.Value)))),""),
sum(Fields!WorkoutActual.Value)/sum(Fields!TimeWorkedActual.Value))"
This condition is satistfying at Row Level Calculation.
But at sub total and Grand total level the calculation is only happening for one condition i.e.sum(Fields!WorkoutActual.Value)/sum(Fields!TimeWorkedActual.Value))
The secondary calculation values are not getting added
Hope i m writing the condition wrong, Please assist.
We are not using any groups here.
June 25th, 2011 9:02pm
This forum is about Transact-SQL, and you talk about reports. You may get better help if you ask in a forum for your reporting software.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2011 11:00pm
Hi APradeep,
Could you please provide me with more information about the matrix structure? For example, the dataset with some sample data, the
current result based on the dataset and the result you expected. An image attached will be much more appreciated.
Generally speaking, if we do not specify the scope in the aggregate function explicitly, the default scope the function applied to
will be current scope, which is influenced by the location of the expression in the report.
So, sometimes we need add the name of a dataset, group, or data region as required manually, like Sum(Fields!Column1.Value,"RowGrpName").
Thanks,
Lola Wang
Please remember to mark the replies as answers if they help.
June 28th, 2011 12:53pm
I have found a solution for this issue,
I m using VS2005,
I think the issue is because i m using 2 different calculation for the same report,
I have implemented the same logic On the Database.
My main concern was I have 2 fields
Time Workout Actual
Workout Actual
If these fields are Zero or NULL the system should use the secondary logic
sum(Fields!AHT_Logic_NR.Value)/
(sum(Fields!AHT_Logic_Dr.Value)))),""),
This logic was working fine at the Row level calculation.
But the secondary logic was failing at Total and Sub-Total level.
At the total and Sub-Total level the secondary logic row values are getting eliminated and giving me a Total of Time
Workout Actual & Workout Actual.This is wrong.
So i have implemented the logic on Server Level and placed it in the data set. Now the report is working fine.
Now the report Field has only one value i.e. sum(Fields!WorkoutActual.Value)/sum(Fields!TimeWorkedActual.Value))"
This is working fine now.
But i m still left over with my doubt , Cant we use to Calculations in One Report Field.?
Pradeep A
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2011 2:37am