Column sum in SSRS - job efficiency report

Hello,

I’m trying to provide production with a simple job efficiency report, but I’m stuck on an SSRS calculation. I don’t know SSRS too well, and maybe this isn’t even possible, but this is all I’ve been able to come up with as an approach.

I’m grouping by JobNum then OpCode:

I’m comparing the sum of the my labor entries against the estimated hours. This is the genesis of my problem as I want to sum the labor entries, but not sum the repeated value of EstProdHours.

My idea was to remove the EstProdHours from the detail row and place it in the OpCode group footer in hopes that the job group EstProdHours sum would only include the total estimate from each operation.

Unfortunately, whether I place the estimated hours in the detail row or not, the sum still includes all of the repeated estimate values.

The 1297.00 estimate is the result of including the estimate in the detail row, even though it’s only present in the operation group footer. Odd behavior, but I’ve tested it enough to realize this is just how it ‘works’.


Just to prove out that the total estimate being derived as if I have the estimated hours in the detail row…I get the same 1297 total with the estimate included as a detail:

Is it possible to just sum the footer values, or any other way to handle a situation like this where I want to sum one column with unique values but treat a column of static values differently? Or does someone with a better brain have a different approach? I basically have what I want outside of the ability to sum the total estimate per job…I only have per operation as it stands.

Thank you.

1 Like

Try this in your job grouping footer: =sum(max(Fields!JobOper_EstProdHours.Value,“LaborDtl_OpCode”))

1 Like

Thank you, Jennifer. One step closer!

Your suggestion made me realize that I needed to change my grouping from OpCode to OpSeq as we sometimes use the same op code twice (assembly > potting > assembly).

Using this expression (replacing LaborDtl_OpCode with LaborDtl_OprSeq)
=Sum(max(Fields!JobOper_EstProdHours.Value,“LaborDtl_OprSeq”))

It throws this error at me:
image

I searched the error and the results suggest that I’m using an incorrect dataset name, but I’m unable to go any further than that. For what it’s worth, this error was thrown even before I made the group change from OpCode to OprSeq.

When you changed your group from OpCode to OpSeq, did you just change the field that the OpCode group was grouping on? If so, even though you are grouping on OpSeq, the group name stayed the same, so the expression would remain as I originally posted. If you share another screenshot of your updating grouping, we can get this figured out.

1 Like

I think I changed all of the required fields/expressions, but it’s definitely possible I missed something.

This error showed with the original expression prior to my group change as well.

Thanks!

Your group looks good. Can you verify where TextBox103 is (which group it belongs to) and that the text of the expression in TextBox103 is still =Sum(max(Fields!JobOper_EstProdHours.Value,“LaborDtl_OprSeq”)).

1 Like

TextBox103 is in the JobNum group footer, the expression looks identical to yours.

Your quotation mark around the scope has weird formatting. Type the expression out by hand in notepad then paste it into SSRS and try again.

1 Like

Oh wow…great eye! It was the quotes, how weird is that?

Thank you very much for the help, this is exactly the fix I needed…very much appreciated!