Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Reporting Services - References

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
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
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

783 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