on 10-22-2014 1:24 PM
Hi,
I have been trying to debug a project and everything is perfect except for the report generation module.
For report generation i am using Crystal reports, However when i try to generate the report, the Below error is displayed. Could anyone Help me to rectify the error.
The Related coding is given below:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using System.Data.SqlClient;
namespace msmReports
{
public static class util
{
public static void billById(string billno)
{
frmrptViewer frm = new frmrptViewer();
frm.crv.ReportSource = new rptbill();
ParameterFields fields = new ParameterFields();
ParameterField field = new ParameterField();
field.Name = "@billno";
ParameterDiscreteValue value = new ParameterDiscreteValue();
value.Value = billno;
field.CurrentValues.Add(value);
fields.Add(field);
frm.crv.ParameterFieldInfo = fields;
frm.Show();
}
public static void viewstock()
{
msmReports.frmrptViewer frm = new msmReports.frmrptViewer();
frm.crv.ReportSource = new msmReports.rptStockview();
frm.Show();
}
}
}
.
Please Check and reply if any solutions can be offerred.
Regards Noel......
Message was edited by: Don Williams
Hi,
See this example: C# Crystal Reports Dynamic Logon parameters
crystal report: Failed to open the connection
Please check the above threads after update the code.
Thanks,
DJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The search string 'crystal net vendor code 17' returned teh following KBAs:
Please see if these help.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel,
You code doesn't show where the report is logging into the database. You need to have the report log onto the database before it can use parameters or anything else.
The error message also indicates it failed to open a connection, indicating it can't connect to the database. If your connection is being done in another part of code, make sure your connection string is correct.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you searched your DB help file to see what Error 17 means? CR is simply passing the error generated by the client to you.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moved to: SAP Crystal Reports, version for Visual Studio
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.