Question : SSRS Error when I use RunningValue function

My clients buy hours from me to use on various trouble tickets.  I have a MSSQL database of trouble tickets that looks like this:

Table tickets with columns: id, name, client_id, case_number
Table tickets_extra with columns: id, hours, date

 I've added a report that uses a calculated field in the dataset.  I defined CalculatedHoursBalance like this:

CalculatedHoursBalance=RunningValue(Fields!hours.Value,Sum,nothing)

I cannot run the report like this because if I try to preview it I get:

Error      1      An internal error occurred on the report server. See the error log for more details.      V:\Visual Studio 2005\Projects\Test Reports\Test Reports\Client Ledger.rdl      0      0      
 
Any ideas?  
Code Snippet:
1:
2:
3:
SELECT tickets_extra.date, tickets.name, tickets.ticket_number, tickets_extra.hours
FROM tickets LEFT OUTER JOIN tickets_extra ON tickets.id = tickets_extra.id
WHERE (tickets.client_id = @client_id)
Open in New Window Select All

Answer : SSRS Error when I use RunningValue function

I never mentioned the database/sql table. You cannot use an aggregate function in a calculated field (which I did look into). Aggregates are used in whatever object is displaying the data within the body of the report. If you have a table in the report then you would use the RunningValue function in one of the table cells as part of the cell's expression.
Random Solutions  
 
programming4us programming4us