Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

Fahad Ali

@Fahad Ali
About
Posts
6
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How To Pass Parameters To A Crystal Report Programmatically
    F Fahad Ali

    I am making a report in which i have to show that how many purchase orders were issued to which supplier.So i am taking input from the user, the id of the supplier.That id belongs to a certain supplier.i am having problems with the parameters, how do i send the Supplier_Id to the crystal report so that i can view the data.This code given is working fine i am using command in which i am giving hard coded values like where Supplier_Id=2 with the query But what my problem is, that how can i get the value from Combo box into the command object.The report is being displayed with this code but it's hard coded like where Supplier_id=2.Now tell me what should i do in order to take values dynamically into the command object.Pls give me a detailed description and if i am using the wrong technique guide me,which technique should i use as i am new to C.R.Thanks. try { int Supplier_Id = Convert.ToInt32(Supp_Id_C.Text); string sp="sp_P_S_Rpt"; SqlConnection conn = Class_Connection.Make_Conn(); SqlCommand command = new SqlCommand(sp, conn); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@Supplier_Id", SqlDbType.Int).Value = Supplier_Id; SqlDataAdapter adapter = new SqlDataAdapter(command); DataSet ds = new DataSet(); ds.Clear(); adapter.Fill(ds, "P_S_Rpt"); dataGrid1.DataSource = ds; //dataGrid1.DataMember = "P_S_Rpt"; CrystalDecisions.CrystalReports.Engine.ReportDocument rptDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); //rptDoc.FilePath = "MyTaskReport1.rpt"; //rptDoc.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e"); rptDoc.Load("CrystalReport1.rpt"); rptDoc.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e"); rptDoc.SetDataSource(ds); //frmReport objfrmReport = new frmReport(); // objfrmReport.crViewer1.ReportSource = rptDoc; // objfrmReport.crViewer1.RefreshReport(); // objfrmReport.Show(); //rptDoc.Refresh(); crystalReportViewer1.ReportSource = rptDoc; crystalReportViewer1.RefreshReport(); //crystalReportViewer1.Refresh(); //crystalReportViewer1.Show(); } catch(Exception ee) { MessageBox.Show(ee.Message); } Fahad

    C# tutorial question sharepoint database help

  • hi friends!
    F Fahad Ali

    It's all up to you my friend in how many hours you grasp a particular topic. If you nee books regarding .Net i can help you on it.By the way i am working on C# if u have any query you may ask i'll give you the answers if they are in my knowledge.Best Of Luck ;) fahad.ashraf.ali@gmail.com Fahad

    C# c++ csharp

  • How To Overcome Query Engine Error
    F Fahad Ali

    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(); //sam

    C# help database sharepoint tutorial

  • Pls Help Me !!!
    F Fahad Ali

    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=sa;PASSWORD=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

    C# help database sharepoint

  • How To Ping Another Pc
    F Fahad Ali

    Can anyone tell me how to ping another pc.Actually i am working on a grid project using alchemi architecture in which i have to see whether the executors are working or not so that the threads can be distributed among them. -- modified at 19:40 Monday 15th May, 2006

    C# css architecture tutorial

  • How To Hide Processes In Task Manager
    F Fahad Ali

    I want to hide the processes in the task manager using C#.Let me tell you it's only for the learning purpose it doesn't mean that i want to make a key logger. I would appreciate if someone helps me :) Fahad Ali

    C# csharp tutorial learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups