all groups > sql server reporting services > march 2005 >
You're in the

sql server reporting services

group:

Custom assembly problems


Custom assembly problems Chris Mackey
3/14/2005 3:07:02 PM
sql server reporting services: I've created a custom assembly using C# that provides utility functions for
reporting services. I'm getting a the following compile time errors.

1. Error while loading code module: 'accentopto.report.utilities,
Version=1.0.1885.19928, Culture=en-US, PublicKeyToken=null'. Details: File or
assembly name accentopto.reporting.utilities, or one of its dependancies, was
not found.

2. Error in class instance declaration for class Utilities: [BC30002] Type
'Utilities' is not defined.

I've verified the version metadata using ildasm.

Here are the CodeModules and Classes elements from the .rdl file.

<CodeModules>
<CodeModule>accentopto.report.utilities, Version=1.0.1885.19928,
Culture=en-US, PublicKeyToken=null</CodeModule>
</CodeModules>

<Classes>
<Class>
<ClassName>Utilities</ClassName>
<InstanceName>Utilities</InstanceName>
</Class>
</Classes>

Here is the CodeGroup element in the rspreviewpolicy.config file for the
Designer

<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="Execution"
Name="Accent_Reporting_Utilities"
Description="Code group for Accent data processing extensions">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\accentopto.report.utilities.dll"/>
</CodeGroup>

I've verified that the assembly is in the Report Designer directory.

Here's the code snippet from the Utilities class.
--
using System;
using System.Globalization;

namespace com.accentopto.bizlogic.reporting.rs_shared
{
/// <summary>
/// Shared reporting utilities
/// </summary>
public class Utilities
{
private CultureInfo culture;
private Calendar calendar;

public Utilities()
{
this.culture = new CultureInfo("en-US", false);
this.calendar = culture.Calendar;
}

protected DateTime WeekEndDate(string inDate)
{
DateTime dateOut, dateIn;
string day;

dateIn = Convert.ToDateTime(inDate, culture);
day = dateIn.DayOfWeek.ToString();

switch(day)
{
case "Sunday":
dateOut = dateIn.AddDays(6);
break;
case"Monday":
dateOut = dateIn.AddDays(5);
break;
case "Tuesday":
dateOut = dateIn.AddDays(4);
break;
case "Wednesday":
dateOut = dateIn.AddDays(3);
break;
case "Thursday":
dateOut = dateIn.AddDays(2);
break;
case "Friday":
dateOut = dateIn.AddDays(1);
break;
default:
dateOut = dateIn;
break;
}
return dateOut;
}

/*
* Entry point for testing only
*
public static void Main(string []args)
{
string printDate;
Utilities util;
util = new Utilities();

printDate = util.WeekEndDate(args[0]).ToString();

Console.WriteLine(printDate);
}
*/
}
}

The only thing that I can think of is that my refs to System.Globalization
aren't available.

Thanks for any help.

--
Chris Mackey
Sr. Software Developer
Accent Optical Technologies
re:Custom assembly problems edson_emidio NO[at]SPAM hotmail-dot-com.no-spam.invalid
5/20/2005 1:03:45 AM
you must place dll file i

\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bi

directory in Report Server

Edson Emidi
AddThis Social Bookmark Button