Solved

SQL Reporting Services - References

Posted on 2009-03-31
4
569 Views
Last Modified: 2012-06-21
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

0
Comment
Question by:ochness
  • 2
  • 2
4 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 24033490
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
0
 
LVL 1

Author Comment

by:ochness
ID: 24033636
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.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 125 total points
ID: 24036298
Code should get a capitalized C:
=Code.InventoryType(Fields!invttype.Value)
 
Also check your function name, it contains a typo (InventotyType)
0
 
LVL 1

Author Closing Comment

by:ochness
ID: 31565019
Thank you very much for your help. Those typo's will get me every time.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now