Link to home
Start Free TrialLog in
Avatar of ochness
ochness

asked on

SQL Reporting Services - References

I am fairly new to SQL Reporting Services. I am trying to use custom code for the first time (which I have attached) and I am not understanding the "References" tab. What am I to fill out here? What would the "Assembly Name" be and what needs to be put in the "Class Name" and "Instance Name" sections?

Any help would be great....Thanks.
Public Function InventotyType(ByVal invttype as String) as String   
IF invttype = "C" Then
  Return "Component Part"
End If
IF invttype = "L" Then
  Return "Labor"
End If
IF invttype = "F" Then
  Return "Finished Good"
End If
IF invttype = "M" Then
 Return "Machine Overhead"
End If
IF invttype = "D" Then
  Return "Other Direct Costs"
End If
IF invttype = "O" Then
  Return "Other Type of Item"
End If
IF invttype = "R" Then
  Return "Raw Material"
End If
IF invttype = "S" Then
  Return "Subassembly"
End If
IF invttype = "" Then
  Return "No Type"
End If
End Function

Open in new window

Avatar of ValentinoV
ValentinoV
Flag of Belgium image

I believe you're mixing 2 different ways of integrating custom code into SSRS.  Your questions are about using a custom assembly but I think what will be the easiest for your case is the method using embedded code.

Both methods are described here: http://msdn.microsoft.com/en-us/library/ms155798(SQL.90).aspx
Avatar of ochness
ochness

ASKER

Ok, so I have read the article from MSDN and I'm still confused. I'm using the following code: =code.InventoryType(Fields!invttype.Value)

and I get the following error:
[rsCompilerErrorInExpression] The Value expression for the textbox invttype contains an error: [BC30456] 'InventoryType' is not a member of 'ReportExprHostImpl.CustomCodeProxy'.

Again any suggestions will be great.
ASKER CERTIFIED SOLUTION
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ochness

ASKER

Thank you very much for your help. Those typo's will get me every time.