Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

SSRS 2008 How to replicate RunningTotal and evaluate options that are available in Crystal

I have a crystal report that I am rebuilding inside of SSRS. In my crystal report I have a running total field that is the Sum of "detail.amount". I have a formula I use to evaluate and return the amount if {@StringType}= 'h'. "StringType" is a formula field that gives me left({Detail.joballoc},1)

Can someone tell me how I can accomplish the same thing inside of SSRS?

Any help is much appreciated.

Thanks!
0
J C
Asked:
J C
  • 5
  • 3
1 Solution
 
rpkhareCommented:
There are plenty of links if you search Google to get running total.

Check this link:

Running totals per page in SSRS to display cumulative totals.
0
 
J CAuthor Commented:
Did you read my entire question? I know there is a RunningValue operator but I need to place conditions on it. I explained my scenario. Any further assistance is appreciated.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
J CAuthor Commented:
This is what I have constructed based on what PatelAlpesh provided. When the report is run it displays "Error". Do you see anything wrong with this expression?

=RunningValue(IIF(LEFT(Fields!joballoc.Value,1) = "H", Fields!detail_amount.Value, 0),Sum,"DataSet1")
0
 
rpkhareCommented:
@jleecole:

Sorry I missed your point in my previous answer.

What exactly is the error message?
0
 
J CAuthor Commented:
It only tells me #Error
0
 
J CAuthor Commented:
Warning      1      [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox109.Paragraphs[0].TextRuns[3]’ uses an aggregate function on data of varying data types.  Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type.
0
 
rpkhareCommented:
Please try few things:

=RunningValue(IIF(LEFT(Fields!joballoc.Value,1) = "H", Fields!detail_amount.Value, Nothing),Sum,"DataSet1") 

Open in new window


or

=RunningValue(IIF(LEFT(Fields!joballoc.Value,1) = "H", CDbl(Fields!detail_amount.Value), CDbl(0)),Sum,"DataSet1") 

Open in new window


Try both these ways and let me know.
0
 
J CAuthor Commented:
rpkhare,

Can't thank you enough.

=RunningValue(IIF(LEFT(Fields!joballoc.Value,1) = "H", Fields!detail_amount.Value, Nothing),Sum,"DataSet1") worked!

Thanks
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now