?
Solved

SQL Reporting Services - References

Posted on 2009-03-31
4
Medium Priority
?
573 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 500 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

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?
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

719 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