Solved

SQL Reporting Services - References

Posted on 2009-03-31
4
571 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

759 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