|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Monday, November 14, 2011 6:35 PM
Points: 67,
Visits: 21
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, July 01, 2010 12:28 PM
Points: 1,
Visits: 5
|
|
I'm new to SSRS and I'm having trouble understanding how to use this script. Can you please assist?
I've entered the following in the report perameters - code window.
Public Function CalcRatio(ByVal Numerator As Object, ByVal Denominator As object, ByVal DivZeroDefault As Object) As Object
If Denominator <> 0 Then Return Numerator/Denominator Else Return DivZeroDefault End If End Function
I then entered the following in the expression of the textbox.
=code.CalcRatio((sum(Fields!total.Value)+(Fields!Adjustment.Value))/Fields!Goal.Value, 0)
but I get the following error.
The Value expression for the textbox ‘textbox28’ contains an error: [BC30455] Argument not specified for parameter 'DivZeroDefault' of 'Public Function CalcRatio(Numerator As Object, Denominator As Object, DivZeroDefault As Object) As Object'.
What am I doing wrong?
Thanks in advance for any help you may be able to provide.
Regards, Missa
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, September 19, 2011 9:38 PM
Points: 1,
Visits: 5
|
|
| Thank you, Thank you, Thank you, Thank you, Thank you, Thank you.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 06, 2013 10:33 AM
Points: 2,
Visits: 95
|
|
How can I apply the custom code to this following expression?
=((Sum(Fields!test1.Value) / Sum(Fields!test9.Value) * 10 + Sum(Fields!test2.Value) / Sum(Fields!test9.Value) * 10 + Sum(Fields!test3.Value) / Sum(Fields!test9.Value) * 10 + Sum(Fields!test4.Value) / Sum(Fields!test9.Value) * 10) – (Sum(Fields!test5.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test6.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test7.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test8.Value) / Sum(Fields!test10.Value) * 10)) / (Sum(Fields!test5.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test6.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test7.Value) / Sum(Fields!test10.Value) * 10 + Sum(Fields!test8.Value) / Sum(Fields!test10.Value) * 10)
|
|
|
|