473,378 Members | 1,680 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,378 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 8683

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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.