SQL Report - RunningValue and Summing of ReportItems

Gwasshoppa

Member
Joined
Aug 26, 2011
Messages
7
Programming Experience
5-10
Hi All

I have a crystal report that I need to port into SQL Reporting Servicves. Unfortunately there is a lot of summing and report item summing going on in the report and I am unsure how to do this in reporting services due to not being able to Sum to 2 ReportItems in the header/footer of the report, and not being able to refer to 2 reportItems in the body of the report.

Crystal Report View.jpg

As you can see from the crystal report there is a lot of summing of report fields going on.

I just cant seem to replicate this type of behaviour in SQL reporting...I either get:
"An expression in a page header or footer can refer to only one report item" OR
"Aggregate functions can be only used on report items contained in the page headers or footers"

Can anyone find a way of replicating this report in reporting services??

Cheers
Gwasshoppa
 
Horray!!!... Figured it out :)

I put the data into the main body of the report, and created a public code function like this:



Public Function SumEarlyValue(ByVal headEarly As Double, ByVal headTotalJobs As Double) As Double
If headTotalJobs <> 0 Then
Return headEarly / headTotalJobs
Else
Return 0
End If


End Function

Then in the fields i placed this:
=Code.SumEarlyValue(RunningValue(IIF(Fields!DIFOTA.Value=-1,1,0), Sum, "Dataset0"),RunningValue(Fields!DIFOTA.Value, Count, "Dataset0"))

Seems to work for the first one... hopefully I will be able to sum them all at the bottom lol
 
Back
Top