示例#1
0
        private void ExecuteIndividual()
        {
            Font          font         = new Font("Tahoma", 9);
            Font          fontBold     = new Font("Tahoma", 9, FontStyle.Bold);
            Font          fontTitle    = new Font("Tahoma", 17, FontStyle.Bold);
            Font          fontSubTitle = new Font("Tahoma", 10, FontStyle.Bold);
            ReportComplex report       = new ReportComplex(true, false);

            report.AddTitle("Title", Lan.g(this, "PPO Writeoffs"), fontTitle);
            report.AddSubTitle("PracTitle", PrefC.GetString(PrefName.PracticeTitle), fontSubTitle);
            report.AddSubTitle("Date SubTitle", date1.SelectionStart.ToShortDateString() + " - " + date2.SelectionStart.ToShortDateString(), fontSubTitle);
            report.AddSubTitle("Claims", Lan.g(this, "Individual Claims"), fontSubTitle);
            if (textCarrier.Text != "")
            {
                report.AddSubTitle("Carrier", Lan.g(this, "Carrier like: ") + textCarrier.Text, fontSubTitle);
            }
            DataTable table = new DataTable();

            table = RpPPOwriteoff.GetWriteoffTable(date1.SelectionStart, date2.SelectionStart, radioIndividual.Checked, textCarrier.Text, GetWriteoffType());
            QueryObject query = report.AddQuery(table, "", "", SplitByKind.None, 1, true);

            query.AddColumn("Date", 80, FieldValueType.Date, font);
            query.AddColumn("Patient", 120, FieldValueType.String, font);
            query.AddColumn("Carrier", 150, FieldValueType.String, font);
            query.AddColumn("Provider", 60, FieldValueType.String, font);
            query.AddColumn("Stand Fee", 80, FieldValueType.Number, font);
            query.AddColumn("PPO Fee", 80, FieldValueType.Number, font);
            query.AddColumn("Writeoff", 80, FieldValueType.Number, font);
            query.AddSummaryLabel("Stand Fee", "Totals:", SummaryOrientation.West, false, fontBold);
            if (!report.SubmitQueries())
            {
                DialogResult = DialogResult.Cancel;
                return;
            }
            FormReportComplex FormR = new FormReportComplex(report);

            FormR.ShowDialog();
            DialogResult = DialogResult.OK;
        }