Click here to Skip to main content
15,918,268 members
Home / Discussions / C#
   

C#

 
Questionremoting comunication Pin
MihaiChioariu12-Jul-06 22:29
MihaiChioariu12-Jul-06 22:29 
AnswerRe: remoting comunication Pin
LongRange.Shooter13-Jul-06 3:38
LongRange.Shooter13-Jul-06 3:38 
QuestionRead data from SmartCard Pin
Daniele Ferrero12-Jul-06 22:11
Daniele Ferrero12-Jul-06 22:11 
AnswerRe: Read data from SmartCard Pin
Tom Delany14-Jul-06 11:17
Tom Delany14-Jul-06 11:17 
QuestionC# Pin
skyeddie12-Jul-06 21:41
skyeddie12-Jul-06 21:41 
AnswerRe: C# Pin
stancrm12-Jul-06 21:51
stancrm12-Jul-06 21:51 
AnswerRe: C# Pin
PlayByTheRules12-Jul-06 22:03
PlayByTheRules12-Jul-06 22:03 
QuestionHow To Overcome Query Engine Error Pin
Fahad Ali12-Jul-06 21:32
Fahad Ali12-Jul-06 21:32 
i am using this code to print a report but the problem comes when i pass parameters like Supplier_Id as i have done in this query the error comes like "Query engine Error and follows with the path.I am using this code.Well the problem doesn't comes with the query in which i have not passed parameters Pls help me to sort out this problem.Thanks Fahad.

try
{
int Supplier_Id=Convert.ToInt32(Supplier_Id_C.Text);
string s_p="sp_P_S_Rpt";
SqlConnection conn = Class_Connection.Make_Conn();
// SqlCommand command = new SqlCommand(s_p, conn);
// command.CommandType = CommandType.StoredProcedure;
// command.Parameters.Add("@Supplier_Id", SqlDbType.Int);
// command.Parameters["@Supplier_Id"].Value = Supplier_Id;
// SqlDataAdapter adapter = new SqlDataAdapter(command);
// DataSet ds = new DataSet();
// adapter.Fill(ds, "P_S");
//


// dataGrid1.DataSource=ds;
// dataGrid1.DataMember="P_S";
// P_R_Rpt obj = new P_R_Rpt();
// obj.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e");
// obj.SetDataSource(ds);
// crystalReportViewer1.ReportSource=obj;
// Cursor = System.Windows.Forms.Cursors.Default;
//reportDocument1.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e");


// reportDocument1.SetDataSource(ds);
// crystalReportViewer1.ReportSource = reportDocument1;

// Finalized.P_R_Rpt obj = new P_R_Rpt();
// obj.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e");
// reportDocument1.SetDataSource(ds);
// crystalReportViewer1.ReportSource = reportDocument1;

SqlCommand command = new SqlCommand(s_p, conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@Supplier_Id", SqlDbType.Int);
command.Parameters["@Supplier_Id"].Value = Supplier_Id;
SqlDataAdapter adapter = new SqlDataAdapter("SELECT dbo.Supplier.Supplier_Name, dbo.P_Order.P_O_Date, dbo.P_Order.P_O_Serial_No, dbo.P_Order.P_O_Id FROM dbo.P_Order INNER JOIN dbo.P_O_Details ON dbo.P_Order.P_O_Id = dbo.P_O_Details.P_O_Id INNER JOIN dbo.Supplier ON dbo.P_O_Details.Supplier_Id = dbo.Supplier.Supplier_Id WHERE(dbo.P_O_Details.Supplier_Id = 2)","Data Source=CDMA;Database=Final_Project1_e;UID=saASSWORD=sa");// = new SqlDataAdapter(command);
//P_R ds = new P_R();
//SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
adapter.Fill(ds,"P_R_Rpt1");

dataGrid1.DataSource=ds;
dataGrid1.DataMember = "P_R_Rpt1";
//P_R ds = new P_R();
// P_R_Rpt obj = new P_R_Rpt();
// obj.Load();
// obj.SetDataSource(ds);
P_R_Rpt1 obj = new P_R_Rpt1();
obj.SetDataSource(ds);
//obj.Load();

//sample_Rpt1.FilePath = @"C:\\Documents and Settings\\Fahad\\Desktop\\Finalized_With_Report\\Sample_Rpt.rpt";
obj.SetDatabaseLogon("sa","sa");//oRpt.SetDataSource (ds);

crystalReportViewer1.Visible=true;//CrystalReportViewer1.Visible=true;
crystalReportViewer1.DisplayGroupTree=false;
crystalReportViewer1.ReportSource = obj;//CrystalReportViewer1.ReportSource = oRpt;
//obj.Load();
//obj.Refresh();
// crystalReportViewer1.RefreshReport();//.RefreshReport()
// crystalReportViewer1.Refresh();//crystalReportViewer1.Refresh()
// crystalReportViewer1.Show();//crystalReportViewer1.Show()


}
catch(Exception ee)
{
MessageBox.Show(ee.Message);
}

AnswerRe: How To Overcome Query Engine Error Pin
stancrm12-Jul-06 21:53
stancrm12-Jul-06 21:53 
QuestionHow to use windows XP remote desktop services through .net application Pin
rizwan.afsar12-Jul-06 20:49
rizwan.afsar12-Jul-06 20:49 
QuestionHighlight function Pin
printscreen1234512-Jul-06 19:50
printscreen1234512-Jul-06 19:50 
AnswerRe: Highlight function Pin
LongRange.Shooter13-Jul-06 3:43
LongRange.Shooter13-Jul-06 3:43 
QuestionHow to restrict the user entering some invalide keys in TestBox Pin
engsrini12-Jul-06 19:30
engsrini12-Jul-06 19:30 
AnswerRe: How to restrict the user entering some invalide keys in TestBox Pin
Anh_Tuan12-Jul-06 19:48
Anh_Tuan12-Jul-06 19:48 
AnswerRe: How to restrict the user entering some invalide keys in TestBox [modified] Pin
LongRange.Shooter13-Jul-06 3:47
LongRange.Shooter13-Jul-06 3:47 
QuestionDynamic Form creation [modified] Pin
Supun Manawadu12-Jul-06 18:54
Supun Manawadu12-Jul-06 18:54 
AnswerRe: Dynamic Form creation Pin
Andrew Lygin12-Jul-06 19:09
Andrew Lygin12-Jul-06 19:09 
GeneralRe: Dynamic Form creation Pin
Supun Manawadu12-Jul-06 20:20
Supun Manawadu12-Jul-06 20:20 
QuestionRound Shaped Transparent Forms Pin
AB777112-Jul-06 18:46
AB777112-Jul-06 18:46 
AnswerRe: Round Shaped Transparent Forms Pin
alexey N12-Jul-06 21:04
alexey N12-Jul-06 21:04 
QuestionHow to Create CHM Help file in C#? Pin
Nilesh Gambhava12-Jul-06 18:13
Nilesh Gambhava12-Jul-06 18:13 
AnswerRe: How to Create CHM Help file in C#? Pin
Andrew Lygin12-Jul-06 18:40
Andrew Lygin12-Jul-06 18:40 
GeneralRe: How to Create CHM Help file in C#? Pin
Nilesh Gambhava13-Jul-06 0:50
Nilesh Gambhava13-Jul-06 0:50 
QuestionIs there a way to stop a process from being closed? Pin
Anthony Mushrow12-Jul-06 16:18
professionalAnthony Mushrow12-Jul-06 16:18 
AnswerRe: Is there a way to stop a process from being closed? Pin
Andrei Ungureanu12-Jul-06 18:14
Andrei Ungureanu12-Jul-06 18:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.