Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I have some issue in rdlc
I need to sum of column if the type should be "P"

I got error:
[BC30311] Value of type 'Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field' cannot be converted to 'String'.

Pls advice me

Maideen

What I have tried:

=iif((fields!typeissue="P"), Sum(Fields!code.Value)))
Posted
Updated 3-Apr-17 3:14am
Comments
CHill60 3-Apr-17 8:31am    
Should that be fields!typeissue.Value="P"?
Maideen Abdul Kader 3-Apr-17 9:14am    
Thanks prompt reply

Yes there are only two value. One is P and D

Pls advice me

Thank you
CHill60 3-Apr-17 9:20am    
I have just advised you. The code should look like =iif((fields!typeissue.Value="P"), Sum(Fields!code.Value), False-part-is-missing)) Note the 2nd problem
Maideen Abdul Kader 3-Apr-17 9:36am    
thanks. No error
But I could not get correct results. for example,
if "p" = 43 and D=11.
But result should show 43 for P and 11 for D.
But It shows 54

Pls any solution for this.

Thank you
CHill60 3-Apr-17 9:45am    
I can't see your screen, access your HDD or data, or read your mind so I have no idea why the results are "wrong". However it looks like it is summing all of the fields and not just those where Value=P. How are you populating the report - this sort of thing should be in the query not a field definition

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900