Local Reportviewer And Custom Assembly

Jan 7, 2008

Hi,

I use vs2005 and ssrs 2005.
I have an assembly like

namespace PackageCode

{


public static class Class1

{

public static string GetRequired(bool Split, string Id_StockItem, string InventoryUpdateQuery, string TotalRequired)

{


string outText = "";

return "Test"

...........

I did the
reportViewer.LocalReport.AddTrustedCodeModuleInCurrentAppDomain
(€?PackageCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d1c15bd232054a1€?);
part in my code.

I also added the
[assembly: System.Security.AllowPartiallyTrustedCallers]
too.

I published the assembly to GAC.

I added the dll as reference in rdlc file.
And I get this error when I try to enter this code under a textbox


=PackageCode.Class1.GetRequired(CBOOL(Fields!Split.Value),CSTR(Fields!StockItem),.....)

GetRequired is underlined with a red error line which says "unrecognized identifer" when I mouseover onto it.
And when I run the report I get #Error in that textbox.

I dont have a reporting server.I get the data from a dataset.
What to do now ?
Thanks for help.




View 4 Replies


ADVERTISEMENT

Custom Web App For Reportviewer

Sep 25, 2007



Hi,

I am trying to develop a custom web page to display and generate our company reports.
It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a
dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame
that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the
generated report).

Does anybody has some pointers or links on the web where some of this is a little bit documented.
I have dev skills in vb.net and know how to work with ssrs.
My web dev skills are intermediate.

All info, tips, hints are very welcome ...

Greetings
Vinnie

View 2 Replies View Related

Using ReportViewer In Local Processing Mode

Sep 23, 2007

When I run the Visual Basic sample code in TechNet article:

http://technet.microsoft.com/en-us/library/aa337091.aspx

which displays data from a Sales Order Header table and a Sales Order Detail table in a ReportViewer control, I am not able to view any detail data. The header information displays just fine. I checked the query used for gathering the detail records by executing a query through SQL Management Studio and it appears to be a valid query which returns the correct detail records.

I'm running the ReportViewer control in a .ASPX page inside Visual Studio 2005 in Local Processing Mode since ultimately I want to use the web page on a hosted Internet site.

Any ideas as to why the detail records won't display? The row numbers of the detail lines do display.


View 2 Replies View Related

Exception With ReportViewer In Local Mode

Nov 23, 2006

I use a ReportViewer to display a report in local mode (WinForm). As long as I use VS2005 in debug mode, the report is displayed correct without any problems. If I run the compiled application directly, I get a crash message :

"xxx has encountered a problem and needs to close. We are sorry for the inconvenience."....

None of the exception handlings are called (the one where the "Me.ReportViewer1.RefreshReport()" is located and the one from the application "MyApplication_UnhandledException")

Thanks for help

Peter

View 2 Replies View Related

Local Report - How To Display Parameter In ReportViewer

Mar 6, 2008



Hi All,
I have configured the ReportParameter as following, but it is not visible on RunTime ? Any idea why ?



LocalReport oLocalReport = ReportViewer.LocalReport;

List<ReportParameter> oParmList = new List<ReportParameter>();

String sResidentID = "";

sResidentID = "RES100";

ReportParameter oReportParameter = new ReportParameter("ResidentID",sResidentID, true);

oParmList.Add(oReportParameter);

oLocalReport.SetParameters(oParmList);

Appreciate any help,

View 1 Replies View Related

Problem With ReportViewer In Local Mode (parameter Missing A Value)

Feb 16, 2006

Hi all...

I designed an rdlc file to be used with ReportViewer in an ASP.NET page.

The data source I used was an Object DataSource.

When I placed the ReportViewer control on the page, an ObjecrtDataSource control was added too. I configured it for the parameters the report will receive. The first string parameter is named PRO_DES, which has a default value of "" and the data come from request.Form.

When I run the report in the page, the following error appears:

The 'PRO_DES' parameter is missing a value

PRO_DES parameter, since it is a string, could be empty.

I tried to set a default value, but the same message appears.

DataSource is correctly attached to the report, so I don't know where the problem can be.

Any help will bne greatly appreciated

Thanks

Jaime

View 1 Replies View Related

Custom Assembly SecurityException

Feb 26, 2008



Hi,

I'm trying to do something rather weird, but I really need it. I'm trying to launch a SSIS package from a report

I built a custom assembly with one method that loads a package from file and then executes it. The assembly works fine.

I added the custom assembly to the report properties, instantiated the class in the assembly (the method is not static), called the method from the report (a textbox renders the string return value from the method).

I added the


Code Snippet[assembly: System.Security.AllowPartiallyTrustedCallers]
attribute to the AssemblyInfo.cs file

Created the strong name for the assembly.

Got the PublicKeyBlob with ILDASM, used it to add a new CodeGroup with the "StrongNameMembershipCondition" in the policy configuration files of ReportDesigner (RSPreviewPolicy.config), ReportServer (rssrvpolicy.config) and ReportManager (rsmgrpolicy.config).

Copied the dll in the bin folders of ReportServer and Visual Studio PrivateAssemblies.


I keep getting the awfull #Error message on the report when viewing it from ReportManager or ReportServer (in preview mode in VisualStudio all is well because security is not applied to user code).


I tried debugging:
- created a solution with two subprojects, one is the report, the other one is the assembly
- marked the report as the Startup Item
I get a SecurityException in debug and debuglocal modes when I try to instantiate a SSIS package.



Code SnippetPackage = new Package();

While digging in the exception call stack, it turns out I lack a permission for accessing unmanaged code (the source assembly of the exception is mscorlib). Also in the ouput window, while starting debugging i see a lot of SystemArgument exceptions in mscorlib.

I am perfectly aware that in order to be able to launch a SSIS package from code I referenced Microsoft.SqlServer.DtsRuntimeWrap.dll, so in desperation I added another CodeGroup in the aforementioned config files for this dll (StrongNameMembershipCondition) and copied the assembly in the deployment folders.


1: I would really like to know how to get the whole thing working. I find rather strange that even though I set the FullTrust

PermissionSet for my assembly (and the Microsoft.SqlServer.DtsRuntimeWrap assembly) I keep getting security exceptions.

While exploring the web for help I saw I need to assert all individual permissions for every restricted resource I'm accessing in the custom assembly, problem is I don't know exactly which ones I'm accessing and, being new to .NET security, I don't know how.

Surely I need to assert a file IO permission to load the package from file, a sqlclientpermission if I am accessing SqlServer in the package, and perhaps a unmanagedcode permission, given the the exception I described earlier (perhaps the Microsoft.SqlServer.DtsRuntimeWrap assembly is not managed code or is accessing some other unmanaged assembly).

Again, I wouldn't know how.

...and last

2: I tried modifying the assembly to only load a string from a file.. I had some problems with security but I got it working once, but I haven't figured out how exactly 'cause when fiddling around to understand things, I lost the working configuration. Really stupid, I know....
While testing this version of the assembly I followed an advice I found on some blog and restarted IIS and Reporting Services system service..

Is this always necessary after modifying the assembly source ? Do I need to restart every time both IIS AND Reporting Services

I would really appreciate every bit of help or advice anyone has to offer.

Thanks in advance.

View 6 Replies View Related

Using Custom Assembly &&amp; Gacutil &&amp; Sn

Jan 22, 2008

Hello experts,

I need some help please.
Yesterday I get the answer that I had to use an assembly if I would like to use a function as global. Right now I€™m very desperate because my VS didn€™t recognize my DLL.
I get the error: "Could not load file or assembly .....The system cannot find the file specified."
After red the threads I tried to use gacutil.exe to add my assembly to the cache.
This action fails with the error:€? Failure adding Assembly to cache. Attempt to install an assembly without a strong name.€?
After that I tried to build a strong name through the follow execute:
Sn €“Vr ClassLibrary.dll. This action fails too. I get the follow Error description: €œdll does not represent a strongly named assembly€?.

What made me wrong?
Is there an easier workaround?
Have someone a good Idea could help me?

Hope to hear you soon.

Best regards,
Alex

View 4 Replies View Related

Using Custom Assembly As A DataSource

Nov 27, 2007

Hi,

I was wanting to get some data through a custom assemly. I can successfully return a primitive data type such as a string and put it in a textbox, but I really need to return more data, and possibly bind it to a Table.

For example, maybe I could return from the call a Dataset and bind it as a DataSource which then can be bound to a Table, or maybe a array of string.

Is this possible? If so, are there any good examples that you know of?

Thanks,

AussieGuy

View 1 Replies View Related

Problems Using Custom Assembly

Apr 6, 2006

Hi there

I am trying to integrat a custom assembly into a ssis-package. I copy the assembly into the framwork folder (v2.0.50727) add the reference, use the assembly everything fine. When I try to debug I get a message stating that the assembly name, version .... cannot be found. I tried to do that with signing and without - not difference.

Am I missing something?

Please help

View 3 Replies View Related

Using Custom Assembly Problem. Help!

Oct 28, 2005

I've created C# assembly which was included into Script Task code as following:

View 10 Replies View Related

Error In Custom Assembly

Jan 7, 2008

When I add a custom assembly

I am trying to pass certain fields in dataset I am getting the following error



invalid fields i.e. that is fields that I passed are invalid.

It also says multi path identifier for microsft.reportingservices.reportobjectmodel.fieldimpl cud not be found.

Thanks

Sai

View 1 Replies View Related

Custom Assembly Security

Oct 3, 2007

Hello Everyone,

When I run my report from report manager, I get the following error message

Failed to load expression host assembly. Details: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

My report uses a custom assembly. I have already done the following

1. copied the assembly in the "reportserverin" and the "common 7privateassemblies" area
2. Made the following entry in the rssrvpolicy.config

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="RSUtil.TranslationHelper"
Description="Translation Helper Utility">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:Program FilesMicrosoft SQL ServerMSSQL.5Reporting ServicesReportServerinAMOTest.dll"
/>
</CodeGroup>


3. Added the following line to my assemblyinfo.cs file

[assembly: AllowPartiallyTrustedCallers]

regards,
Abhishek.

View 9 Replies View Related

Yet More Issues With Custom Assembly

Feb 28, 2008

I have developed a custom assembly to render a signature from an array of bytes in an SSRS Image control. The assembly works perfectly in the designer. It is strong-named and has the AllowPartiallyTrustedCallers attribute applied to it; I have deployed the assembly to the "%SQL SERVER%MSSQL.3Reporting ServicesReportServerin" folder; given it fulltrust permissions in the rssrvpolcy.config file; made sure that the NTFS file security is correct; and the assembly just doesn't appear to be called. The assembly doesn't execute when I use the "F5" popup preview mode on my development machine, either.

I don't get any error messages in the report, I just don't get any image output, either. The rest of the report elements render correctly. Of course, the SSRS log files are useless. Enabling the Verbose trace switch doesn't yield any useful information, I don't think, except that in the lines pertaining to running my signature-enabled report there are no mentions of even attempting to use my custom assembly.

I have attempted to enable object access auditing (both success and failure) to determine if my assembly is even being accessed by SSRS and there are no audit messages in the Security Event log.


Can anyone offer any other troubleshooting suggestions?

Thanks,
Matthew Belk

View 3 Replies View Related

Custom Assembly And Ssrs 2005

Mar 28, 2008

i deigned assembly and referced it to my report in preview
when deployed the report , i get #Error
i don't add any cas code.
pls help

View 4 Replies View Related

.NET Framework :: How To Use Custom Assembly That Uses AxMetadataServiceClient

Oct 8, 2015

I have build a vb.net class that uses the AxMetadataServiceClient (MS Dynamics Axapta model store) this class works like expected in .net app.When I try to create this assembly in sql it fails with this error

Msg 10300, Level 16, State 2, Line 6

Assembly 'System.EnterpriseServices' references assembly 'System.EnterpriseServices, version=4.0.0.0, culture=neutral, publickeytoken= b03f5f7f11 d50a3 a.', which is not present in the current database.

SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.can't create the assembly since it references it self and can't find it self ?

View 3 Replies View Related

Using Custom Assembly In Ssrs 2008

Mar 25, 2008

I have a custom assembly that I'm trying to use with my resport in Reporting Services in SQL Server 2008.
I keep consistently getting a "Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data,Version=2.0.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089' failed" error. Even in preview mode.

- I added <Assembly: AllowPartiallyTrustedCallers()> attribute to the assembly
- I'm asserting the permission in the routine that is doing the database call with the follwing lines:
Dim permission As SqlClient.SqlClientPermission = New SqlClient.SqlClientPermission(PermissionState.Unrestricted)
permission.Assert()
- I went in .net 2.0 Framework configuration and made the assembly fully trusted
- I added the approprtiate codegroup to the rssrvpolicy.config file
- I tried the same assembly on another PC running SQL server reporting services 2005, its working just fine.

what is it that I am missing?

View 1 Replies View Related

Returning A Dataset From Custom Assembly?

Jan 10, 2007

Is it possible to have a Reporting Services dataset be returned from a custom assembly? I need to produce data for a graph that is not easily queried from the database and I am already familiar with using a custom assembly in an RS report.

What I would like to do is have a method that fills a dataset and returns it to the report for processing. Is this possible?

I am running SQL 2000 and RS 2000.

Thanks.

View 4 Replies View Related

Include Custom Code Assembly

Sep 20, 2007



OK. I created a few functions in a Public Class called SSRSFunctions. I built it and deployed it to my desktop. What do I do now? Can it be included as standard functions in the function list within SSRS? Do I add a reference to the Class at the solution level? At the report level? If all I do is add a reference at the report level, I may as well add the functions to each report's code window, which is what I have been doing. I'd at least like to add a single reference to my solution if I can't get it added to the function list.

Thanks!

View 13 Replies View Related

Rendering A Report Using Custom Assembly

May 17, 2007

I have created a custom assembly and referenced it and the program builds successfully. When I try to run the report in design mode, it will not render, it throws an exception when it tries to create a PDF. When I remove the assembly, the reports work well. So I'm not sure what it is that I'm doing wrong - does anyone have any suggestions?



namespace Calculations

{

public class calcPercentage

{

public static decimal Percentage(decimal decValueOne, decimal decValueTwo)

{

decimal decPercentage = 0;

if (decValueOne == 0 || decValueTwo == 0)

{

decPercentage = 0;

}

else

{

decPercentage = (decValueOne - decValueTwo) / decValueOne;

}

return decPercentage;

}

}

}

Then in my textbox I put:

=Calculations.CalcPercentage.Percentage(SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_Sales"), SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_CGS"))



I referenced the assembly and added it to C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies and I still get that error message so I do not know what the problem is.



The line where the exception occurs happens here:

byte[] bytes = MyReport.rvOutput.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);





Thanks so much for you help! If you have any suggestions about my next error...i'm all ears!

View 7 Replies View Related

Custom Assembly Class Not Defined

Jan 19, 2006

I have a custom assembly that i'm trying to get tied into my report. the problem is when i try to call it i get the error that the class is not defined

I have the class in the references tab and the class name and instance name both have a name.

here's the error I'm getting

Error 1 [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Assembly_1: [BC30002] Type '[ClassName]' is not defined. [Project folder][reportname].rdl 0 0

View 6 Replies View Related

Reporting Services Custom Authentication And Web Reportviewer - Familiar Question

Feb 20, 2007

This is a subject that has been brought up before but I have not seen a definitive answer/solution.
We have implemented a custom authentication extension (forms authentication) for reporting services and it has been working just fine under "normal" conditions; "normal" being users logging in, viewing reports, and then moving on.
Recently some reports were created by our report group and they contain Dundas gauge controls for "dashboard" style reports. These reports are meant to be up all day and they post back every few seconds because the data they present is mission critical.
This of course exposed the inability of the reportviewer control to stay in the context of Report Manager when it comes to the cookie exchange and authentication thus resulting in the following error:
<html><head><title>Object moved</title></head><body>
<h2>Object
moved to <a
href="/ReportServer/logon.aspx?ReturnUrl=%2freportserver%2fReportExecution2005.asmx">here</a>.</h2>
</body></html>

I created a quick ASP.NET web application and added the reportviewer to it, implemented IReportServerCredentials and the report came up as expected but behaved the same way as it did in Report Manager. Same with a Windows Forms application.

Increasing the cookie timeout in the forms authentication tag is an option, but not an attractive one. Extending the reportviewer control is also an option, but I don't know if that is a good candidate right now because I don't see anything extensible yet.

Is this just the nature of RS with custom authentication or is there a viable solution out there right now?

Any and all answers are much appreciated and I thank you in advance.

View 20 Replies View Related

Store Custom Assembly In A Subdirectory Of /bin Folder?

Feb 13, 2008

Good morning all,

Due to "security considerations", the company I am currently working with does not want me deploying custom assemblies into
Microsoft SQL ServerMSSQL.3Reporting ServicesReportServerin.
They have created a subdirectory:

Microsoft SQL ServerMSSQL.3Reporting ServicesReportServerinmySubDirectoryName

Unfortunately, I can't get my report to see the dll when it's in the subdirectory. Is there any way to do this?

Thanks,
Kathryn

View 1 Replies View Related

Custom Assembly Reading From Sql Server 2005

Mar 29, 2008



I designed dll file to get data from sql server, i am calling the dll from ssrs 2005
in preview , everything is ok but after deploying and put the dll file in C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServerin and add this to rssrvpolicy.config

<CodeGroup
class="SqlClientPermission"
version="1"
Name="MySecurityExtensionCodeGroup"
Description="Code Group for Don's test security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:Program FilesMicrosoft SQL ServerMSSQLReporting
ServicesReportServerinMyAssembly.dll"
/>
</CodeGroup>

i still get #Error

i try everything , i don't know what i can do.

pls help

View 1 Replies View Related

Creating A Custom Assembly - Can't Find Directory For DLL

Dec 20, 2007

Hello,

The main problem I am currently facing is that I do not have the following directory to place the DLL file: C:Program FilesMicrosoft SQL Server80ToolsReport Designer. It is the "Report Designer" part that is missing. I tried adding it, but that didn't work.

Any ideas why that is?

Thank you.

-Gumbatman

View 4 Replies View Related

Reference Report Items Within A Custom Assembly?

Mar 14, 2007

How do I reference report items (such as textboxes, datasets, tables, etc...) from within a custom assembly?

Thanks!

View 3 Replies View Related

Deploying A Custom Assembly That Calls A Web Service

Sep 27, 2007

I'm having a terrible time trying to figure out how to do this, does anyone have experience?

My code works fine in the report viewer, but all I get from the deployment is #Error symbols. I've added my custom dll file to the config file and gave it full trust, as well as the URL of the web service I'm calling. I've even modified the rest of the codegroups within the file to FullTrust just in case.

I've also added the [assembly: AllowPartiallyTrustedCallers] to the AssemblyInfo class, and [WebPermission(SecurityAction.Assert)] to the constructor of my custom assembly no avail.

I'm at a complete loss now as to why my deployment cannot run this code. As far as debugging goes, Visual Studio is not located on the reporting server, nor is it an option to have it put there. I've been able to run the code with the web service lines commented out, but as soon as I put even the webservice.Credentials = CredentialCache.DefaultCredentials in I'm greeted with the nice and calming #Error.

Any suggestions?

View 1 Replies View Related

Cannot Deploy Reports Using Custom Assembly - Access Is Denied

Aug 10, 2007

We have a custom assembly that worked fine with SSRS 2000. Now that we have upgraded to SQL 2005 we get an "Access is denied" error when attempting to deploy reports that reference this assembly. I could swear that when we first attempted it it worked. We decided to make a minor change to the assembly code and that's when the problem started, even though I've since reverted back to the original code to make certain that the minor change wasn't the issue. The assembly is in the proper folder - C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServerin - and the reports are referencing the current version. I've searched high and low on the web for an answer but have found nothing even remotely helpful. All this code does is return a string...it's not doing anything that should require any additional security; and even then I doubt if there would be a problem when deploying.


The full text of the error is:
Error while loading code module: €˜Reporting, Version=1.0.2778.12272, Culture=neutral, PublicKeyToken=null€™. Details: Could not load file or assembly 'Reporting, Version=1.0.2778.12272, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.


Any ideas? Anyone? I'm at my wit's end on this!



Thanks,

Mike

View 5 Replies View Related

Custom Assembly : Retrieving Data From From Configuration File.

Mar 7, 2006

Hi all,

my problem is that: I do read informations (e.g. connectionString) from configuration file by one custom assembly.
My environment is RS2005, VS.NET 2005 Prof.Edition, WIN2003 Server SP1, .NET Framework 2.0.50727
The scenario is that:
A text box into my report require a function contained into MyCustom.dll. This code do read information from MyCustom.dll.config.

This file contains:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="IS2009cfg" connectionString="data source=servernameinstancename;initial catalog=dbname;user id=xx;password=yy;" />
</connectionStrings>
<appSettings>
<add key="DefaultHeaderLogo" value="This is a test" />
</appSettings>
</configuration>

Using
ConnectionStringSettings conn = ConfigurationManager.ConnectionStrings["IS2009cfg"];
the result is null.

Also using
string defaultHeaderLogo = ConfigurationManager.AppSettings["DefaultHeaderLogo"];
the result is null.

MyCustom.dll and MyCustom.dll.config are located into locations of Report Server and Report Designer, with this Build Events on succesfully build:

rem Copy custom assembly to ReportDesigner location...
copy "...mydeveloplocation...inDebugMyCustom.dll" "C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesMyCustom.dll"
copy "...mydeveloplocation...inDebugMyCustom.dll.config" "C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesMyCustom.dll.config"
rem Copy custom assembly to ReportServer location...
copy "...mydeveloplocation...inDebugMyCustom.dll" "C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerinMyCustom.dll"
copy "...mydeveloplocation...inDebugMyCustom.dll.config" "C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerinMyCustom.dll.config"

The question is simple: where I do locate configuration file for obtain value during report execution?

Many thank's in advance

Claudio Barca
Turin - Italy





View 2 Replies View Related

Custom Assembly Accessing DB With A NON Hardcoded Connection String?

Mar 25, 2008



We use reporting services to report on our SQL 2005.

I wanted to have a function that translates a filter (parameter) in one RDL from IDs to Names to be able to show a summary of what the user selected when he executed the report.

Instead of writing this function in the .Code, I said great, lets use custom assemblies.


PROBLEM: I see examples on how to enable a function in such dll access to DB, but they all hardcode the connection string in the vb code. that seems useless to me. Each customer will have different server name, I need to get the connection string from the sme (shared data source) used in the catalog's folder. just like the RDl is using it. how do I do that?

View 1 Replies View Related

Null Reference Error When Using A Custom Assembly That Uses An App.config File

Apr 7, 2008

I have a custom assembly that uses a config file to obtain database connection settings. This dll is then used by my sql report. I have added refrerenced to all the required dll's in my report and added the required code groups to all the necessary files. I have also placed my app.config file in C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServer and C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies
However when I actually run the report in the designer (vs2005) I am receiving Null reference exceptions when my code tries to read my config file because it is reading the machine.config file and not my app.config file. If I hard code my connection string everything works fine.

Can anyone tell me why the machine.config file would be referenced instead of my app.config file and how I can stop it from doing this?

View 6 Replies View Related

Assembly.Load Can't Load My Custom Assembly From The GAC.

Mar 7, 2007

Hi there.

I have an assembly, call it A1, that I've deployed to a SQL Server 2005 database. I can use the managed stored procedures from A1 in SQL Server no problem.

In A1 there is a bit of code which uses the Assembly.Load() method, so load another assembly and use instances of class found in that external assembly. However, when I run the managed stored proc in A1 that uses Assembly.Load() I get the error:

Could not load file or assembly 'A1, Version=1.0.0.0, Culture=neutral,PublicKeyToken='????' or one of its dependencies. The system cannot find the file specified.

(note: for security I've changed some of the above line).

So I changed the Assembly.Load() to use

System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089

I re-built the project, re-deployed it and ran the code in SQL Server - it worked. I could create an instance of a System.Data.DataSet for example. So why can't I load my own custom assembly? My assembly does have a strong name and it's installed in the GAC. I wrote a console app to try and Assembly.Load() my custom assembly and that worked fine (it was also running on the same server as the SQL Server).

So it's defiantely the SQL Server that can't 'see' my customer assembly. What do I need to do this assembly so that SQL Server will allow me to Assembly.Load it, just as it can with System.Data?

Thanks
Jas.

View 1 Replies View Related

SQL Server 2014 :: How To Return Bitmap Image From Custom Assembly To SSRS Report

Dec 11, 2013

I am using the QRCode4CS class [URL] .... to generate QR codes.

I can use the following code to successfully return a bitmap image to a picturebox in a Windows Form Application.

public class CreateQRCodeClass
{
public static Image CreateQRCodeImage(string inputString)
{
QRCode4CS.QRCode qrcode = new QRCode4CS.QRCode(new QRCode4CS.Options(inputString));
qrcode.Make();
[Code] ....

In trying to adapt the same code (below) to display a QR code in an SSRS report I get the error "There is an error on line 1 of custom code: [BC30311] Value of type 'System.Drawing.Image' cannot be converted to '1-dimensional array of Byte.'

Here is the custom code I am using.

Public Function QRCode(ByVal RetailerId As String) as Byte()
Return QRCode4CSCreateQRCode.CreateQRCodeClass.CreateQRCodeImage(RetailerId)
End Function

Here is the revised custom assembly.

public class CreateQRCodeClass
{
public static byte[] CreateQRCodeImage(string inputString)
{
QRCode4CS.QRCode qrcode = new QRCode4CS.QRCode(new QRCode4CS.Options(inputString));
qrcode.Make();
Image canvas = new Bitmap(86, 86);

[Code] ....

What data type can I successfully return to SSRS to display the image?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved