Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid log on parameter

Status
Not open for further replies.

lutzs

Programmer
Oct 8, 2002
75
LU
Hi,
there is a dataset in my application. I add a column of this
dataset in my crystal report.
I start the program and I will print this report. I get this error message by click the button:
"Unable to connect: invalid log on paramter"

The error is in line:
oRpt.PrintOptions.PrinterName = @"\\PRINTER";
oRpt.PrintOptions.PaperSource = PaperSource.Auto;
oRpt.PrintOptions.PaperSize = PaperSize.PaperA4;

ReportDocument crReportDocument = new ReportDocument();

// this is the report with the dataset column
crReportDocument.Load("C:\\header.rpt");

// this is the error-line
crReportDocument.PrintToPrinter(1, true, 1, 1);

// print another report
oRpt.PrintToPrinter(1,true,1,1);


What can I do?
There exists a database connection.

Thank, Stephanie
 
Are you passing the Report (and it's Database Tables) appropriate LogOn information.
I've dealt with the generation of a number of Crystal reports through code (Delphi and C#) that run against a SQL Server database.
In order to load data into the report you need to prep the information required to log on successfully to the database / tables (ie. server-name, database-name, user-name and password).
I hope that this sets you off in the right direction.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top