473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problems passing parameters to Crystal - pls help.

I know that this has been beaten to death but I can't seem to resolve
my issues (I have 2 of them). I have created a class that exposes a
public method which returns a datatable as a datasource for a Crystal
Report. The method has a single argument which represents a parameter
required by the Stored Procedure.

When I generate the report in Crystal and run it using the class I
built, it works fine. I've tried it with parameters and without,
both scenarios work great. Now when I try to access it from a web
application I start running into problems. By the way, I'm running
Crystal 10, IIS, SQL2000 and .Net 1.0.

I'll list my code below but basically I run into two separate
problems. I'm able to add a value to the CurrentValues collection of
the ParameterFields collection (I verify that it has been added when I
step through my code), however, when I attempt to export the report I
get the following error: "ParameterFieldCurrentValueException". So
after spending a lot of time trying to get a parameter passed over, I
decided to test the web based code by creating another report, one
without parameters.

Well this report didn't provide much help as I get the following,
different, error:
CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.
Details: mscorlib : File or assembly name AUS.Common.Reports.dll, or
one of its dependencies, was not found. What's strange is that the
report runs fine on it's own.

Now to my code:

ReportDocument rep = new ReportDocument();

try
{
rep.Load("c:\\test\\report1.rpt");

// I've tried it both with and without this line:
rep.SetDatabaseLogon("sa","sa");

rep.SetParameterValue("customerID",Request.Form["CustomerID"]);

rep.VerifyDatabase();

'
rep.ExportToHttpResponse(ExportFormatType.Portable DocFormat,
this.Page.Response, false,"");

}
catch (Exception ex)
{
Response.Write(ex.ToString() );
}
finally
{
rep.Dispose();
}

Does anyone have any thoughts or insight as to why I have this
overwhelming urge to pull out all my hair?

Thanks,
Stephan

Complete error output:

CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.
Details: mscorlib : File or assembly name Asset.AUS.Common.Reports.dll,
or one of its dependencies, was not found. Failed to open a rowset.
Error in File C:\WINNT\TEMP\{07FD2BF4-EA08-4D07-91F6-58E3FD792173}.rpt:
Unable to connect: incorrect log on parameters. --->
System.Runtime.InteropServices.COMException (0x8004100F): Logon failed.
Details: mscorlib : File or assembly name AUS.Common.Reports.dll, or
one of its dependencies, was not found. Failed to open a rowset. Error
in File C:\WINNT\TEMP\{07FD2BF4-EA08-4D07-91F6-58E3FD792173}.rpt:
Unable to connect: incorrect log on parameters. at
CrystalDecisions.ReportAppServer.Controllers.Repor tSourceClass.Export(ExportOptions
pExportOptions, RequestContext pRequestContext) at
CrystalDecisions.ReportSource.EromReportSourceBase .ExportToStream(ExportRequestContext
reqContext) --- End of inner exception stack trace --- at
CrystalDecisions.ReportAppServer.ConvertDotNetToEr om.ThrowDotNetException(Exception
e) at
CrystalDecisions.ReportSource.EromReportSourceBase .ExportToStream(ExportRequestContext
reqContext) at
CrystalDecisions.CrystalReports.Engine.FormatEngin e.ExportToStream(ExportRequestContext
reqContext) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.y(ExportOptions
1) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.ExportToHttpResponse(ExportOptions
options, HttpResponse response, Boolean asAttachment, String
attachmentName) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.ExportToHttpResponse(ExportFormatType
formatType, HttpResponse response, Boolean asAttachment, String
attachmentName) at WebApplication3.WebForm1.test1() in
c:\inetpub\wwwroot\webapplication3\webform1.aspx.c s:line 48

CrystalDecisions.CrystalReports.Engine.ParameterFi eldCurrentValueException:
Missing parameter values. --->
System.Runtime.InteropServices.COMException (0x8004100E): Missing
parameter values. at
CrystalDecisions.ReportAppServer.Controllers.Repor tSourceClass.Export(ExportOptions
pExportOptions, RequestContext pRequestContext) at
CrystalDecisions.ReportSource.EromReportSourceBase .ExportToStream(ExportRequestContext
reqContext) --- End of inner exception stack trace --- at
CrystalDecisions.ReportAppServer.ConvertDotNetToEr om.ThrowDotNetException(Exception
e) at
CrystalDecisions.ReportSource.EromReportSourceBase .ExportToStream(ExportRequestContext
reqContext) at
CrystalDecisions.CrystalReports.Engine.FormatEngin e.ExportToStream(ExportRequestContext
reqContext) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.y(ExportOptions
1) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.ExportToHttpResponse(ExportOptions
options, HttpResponse response, Boolean asAttachment, String
attachmentName) at
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.ExportToHttpResponse(ExportFormatType
formatType, HttpResponse response, Boolean asAttachment, String
attachmentName) at WebApplication3.WebForm1.test1() in
c:\inetpub\wwwroot\webapplication3\webform1.aspx.c s:line 48

Nov 16 '05 #1
0 8691

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Aaron | last post by:
The following code works fine when previewing a Crystal report using ASP, EXCEPT when it gets to a report using a SubReport and its associated parameters. The whole report just comes up blank with...
1
by: Tony | last post by:
Hello everyone, Does anyone know what code should i use in order to pass a parameters into the Crystal Report's SQL command? Any web site references is welcomed too! Thanks Tony
0
by: Karel | last post by:
Hi, I'm having a problem with passing parameters to Crystal Report. I'm using the following cod (C#): ParameterFields paramFields = new ParameterFields (); ParameterField paramField = new...
1
by: raf_z | last post by:
Hi, I'm running a website with Asp.NET, and on one of the pages i have a crystal report with 3 user-populated parameters. However, not all params might be selected. Example: Parameters: 1....
10
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, Obtaining Data Based Upon Multiple Selections From a ListBox... I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual...
0
by: lewindha | last post by:
Hi all I am new to ASP.Net and Crystal Reports. We have VS.Net 2003 and Crystal 10 where I work. I have successfully been able to view reports in a web page. My problem now is that I have a...
1
by: Reny J Joseph Thuthikattu | last post by:
Hi, I want to add two parameters from VB.NET to crystal report at run time in order to print it on the report Can any one help me in this regard? Reny
6
by: Smish | last post by:
hey all, I am passing parameters through code to a stored procedure in both windows application (using c# and sql server & crystal reports)and web application(using asp.net & sql server & crystal...
4
by: prabodh bansal | last post by:
Dear sir, I am using asp.net and i want to pass two parameters for date values(from and to) using crystal report. Please help me. My email id is Thanks and regards Prabodh Bansal
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.