Citizen SP
Citizen SP

Reputation: 1411

Dividing 2 ReportItems

I try to divide 2 ReportItems FreeNumberField_14 and FreeNumberField_13 with the following expression:

=(ReportItems!FreeNumberField_14.Value / ReportItems!FreeNumberField_13.Value)

When running the report I receive the following error:

The Value expression for the textrun ‘Textbox82.Paragraphs[0].TextRuns[0]’ contains an error: Input string was not in a correct format. (rsRuntimeErrorInExpression)

What is the correct way to dividing 2 ReportItems?

Upvotes: 0

Views: 328

Answers (2)

Chanom First
Chanom First

Reputation: 1136

try to Convert it to Int,Decimal Or Number before you divide like this

=(CDec(ReportItems!FreeNumberField_14.Value) / CInt(ReportItems!FreeNumberField_13.Value))

Upvotes: 1

Arun Gairola
Arun Gairola

Reputation: 884

=Cdec(ReportItems!freefield1.Value)/Cdec(ReportItems!freefiled2.Value)

Upvotes: 2

Related Questions