TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sumit Kumawat
NA
454
411.6k
Crystal report prompt to login in wpf app with ms access db?
Feb 8 2015 7:32 AM
Hii all,
I am creating a WPF app which is using crystal reports for showing details with ms access Database.
it working fine on my machine but after deploying app on client machine it is asking for user name and password before showing report and i didnt give any credential for database. Below is my code
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rpt.Load(AppDomain.CurrentDomain.BaseDirectory + "\\TechReport.rpt");
DataAcessLayer obj = new DataAcessLayer();
Report rptViewer = new Report();
DataTable DataTab = new DataTable();
System.Data.OleDb.OleDbDataAdapter dataAdapter = new System.Data.OleDb.OleDbDataAdapter();
System.Data.OleDb.OleDbConnection CON = new System.Data.OleDb.OleDbConnection();
CON.ConnectionString = obj.connectionString;
string[] tablename = new string[5];
string[] querystring = new string[5];
tablename[0] = "TechnicalParameter";
tablename[1] = "StructualPerameter";
tablename[2] = "PerformancePerameter";
tablename[3] = "EconomicParameter";
tablename[4] = "AcceptibilityParameter";
querystring[0] = "Select * From TechnicalParameter where PlantID= " + id + " ";
querystring[1] = "Select * From StructualPerameter where PlantID=" + id + " ";
querystring[2] = "Select * From PerformancePerameter where PlantID=" + id + " "; ;
querystring[3] = "Select * From EconomicParameter where PlantID=" + id + " ";
querystring[4] = "Select * From AcceptibilityParameter where PlantID=" + id + " "; ;
DataSet DataSet = new DataSet();
for (int I = 0; I <= Microsoft.VisualBasic.Information.UBound(tablename); I++)
{
System.Data.OleDb.OleDbDataAdapter Adapter = new System.Data.OleDb.OleDbDataAdapter();
Adapter = obj.GetDataAdeptor(querystring[I]);
Adapter.Fill(DataSet, tablename[I]);
}
rpt.SetDataSource(DataSet);
rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;
rptViewer.crytt.ViewerCore.ReportSource = rpt;
rptViewer.Show();
Please tell me how to fix this.
thanx in advance
Reply
Answers (
1
)
innerhtml
how to create compiler ?