Click here to Skip to main content
15,902,635 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an Rdlc report. In this report I have a field which takes its values by this expression

(Round(((First(Fields!Occurs.Value) / First(Fields!TotalDistance.Value))* 10000),2)


but in some cases (TotalDistance.Value) = 0 so the previous expression returns Infinity, So I need to get the next record in case of that field equals 0 , If also next field equals 0 , I want to get the next one

I looked for way of getting next record but didn't find I only found (First , Last) methods, How can I do that ?
Posted
Comments
[no name] 27-Nov-14 7:14am    
you mean if totlaDistance is zero then that record should beskipped?
‫أحمد دبنك‬‎ 27-Nov-14 9:10am    
Yes
If (Total Distance) in first record was 0 , then this record should be skipped, and I should get the value from the next record.
then if it was in the next record was also 0 , then it should also be also skipped, and we get the value from the next record , and etc
[no name] 28-Nov-14 9:50am    
Then why you are not filtering the data whose totalDistance is zero. You can get only thoese records having totalDistance greater than Zero.

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