Esempio n. 1
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptDriverPrintout rpt = new rptDriverPrintout();
     rpt.Site = this.Site;
     return rpt;
 }
Esempio n. 2
0
 private void button14_Click(object sender, EventArgs e)
 {
     var drivers = Database.Query("drivers", "learnerKey = '" + learnerKey + "' AND NOT active IS NULL ORDER BY Date");
     //            drivers.WriteXmlSchema("C:\\temp_schema.xml");
     var report = new rptDriverPrintout();
     var data = Database.Row("learner_details", "learnerKey = '" + learnerKey + "'");
     report.DataDefinition.FormulaFields["learner"].Text = "\"" + Convert.ToString(data["Surname"]) + ", " +
                                                           Convert.ToString(data["Name"]) + "\"";
     report.DataDefinition.FormulaFields["learnerNumber"].Text = "\"" + Convert.ToString(data["learnerNumber"]) + "\"";
     report.DataDefinition.FormulaFields["ID"].Text = "\"" + Convert.ToString(data["ID"]) + "\"";
     //report.DataDefinition.FormulaFields["course"].Text = "\"" + Convert.ToString(data["Name1"]) + "\"";
     report.SetDataSource(drivers);
     //logs.WriteXml(@"C:\tmpXml.xml");
     var frmReport = new frmReport(report) { Text = "Drivers Printout" };
     frmReport.ShowDialog();
 }