private void button1_Click(object sender, EventArgs e) { Llista rpt = new Llista(); rpt.RecordSelectionFormula = "{Planets.DescPlanet} = \"" + planeta + "\""; rpt.SetDatabaseLogon("sa", "123456aA!"); crystalReportViewer1.ReportSource = rpt; crystalReportViewer1.Refresh(); Llista1.Refresh(); }
private void btn_Enviar_Click(object sender, EventArgs e) { Llista Informe_2 = new Llista(); Informe_2.RecordSelectionFormula = "{Planets.DescPlanet} = \"" + planeta + "\""; Informe_2.SetDatabaseLogon("sa", "123456aA!"); crv_Informe.ReportSource = Informe_2; crv_Informe.Refresh(); Llista1.Refresh(); }
private void button1_Click(object sender, EventArgs e) { Llista rpt = new Llista(); rpt.RecordSelectionFormula = "{Planets.DescPlanet} = \"" + planeta + "\""; crystalReportViewer1.ReportSource = rpt; crystalReportViewer1.Refresh(); //Llista1.RecordSelectionFormula = "{Planets.DescPlanet} = \"" + planeta + "\""; Llista1.Refresh(); }
private void Form3_Load(object sender, EventArgs e) { SdSData.SQL db = new SQL(); db.Conexion(); DataTable dt = new DataTable(); dt = db.PortarPerConsulta("SELECT DISTINCT \"Planets\".\"DescPlanet\", \"Planets\".\"idPlanet\" FROM (((\"StarWarsOrders\".\"dbo\".\"OrderDetails\" \"OrderDetails\" INNER JOIN \"StarWarsOrders\".\"dbo\".\"Products\" \"Products\" ON \"OrderDetails\".\"ProductID\"=\"Products\".\"ProductID\") INNER JOIN \"StarWarsOrders\".\"dbo\".\"Orders\" \"Orders\" ON \"OrderDetails\".\"OrderID\"=\"Orders\".\"OrderID\") INNER JOIN \"StarWarsOrders\".\"dbo\".\"Categories\" \"Categories\" ON \"Products\".\"CategoryID\"=\"Categories\".\"CategoryID\") INNER JOIN \"StarWarsOrders\".\"dbo\".\"Planets\" \"Planets\" ON \"Orders\".\"PlanetID\"=\"Planets\".\"idPlanet\" ORDER BY \"Planets\".\"DescPlanet\""); comboBox1.DataSource = dt; comboBox1.DisplayMember = "DescPlanet"; comboBox1.ValueMember = "idPlanet"; Llista1.SetDatabaseLogon("sa", "123456aA!"); }