private void barButtonItem13_ItemClick(object sender, ItemClickEventArgs e) { var books = Database.Query("driversserials d JOIN learner_details l ON d.LearnerKey = l.LearnerKey", "division = '" + GlobalProperties.loggedOnUserDivisionAbrev + "'"); //books.WriteXmlSchema("C:\\temp_schema.xml"); var report = new rptDriversSerials(); report.SetDataSource(books); report.DataDefinition.FormulaFields["college"].Text = "\"" + GlobalProperties.LoggedOnUserDivision + "\""; var frmReport = new frmReport(report) { Text = "Learner's\\Driver's Serial Numbers" }; frmReport.ShowDialog(); }