Esempio n. 1
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     ContETAReport rpt = new ContETAReport();
     rpt.Site = this.Site;
     return rpt;
 }
Esempio n. 2
0
        private void etaReport_Click(object sender, EventArgs e)
        {
            try
            {
                string friendlyConstraints;

                EMDataSet dataSet = CreateContainerViewOfDataSet(out friendlyConstraints);
                GenericCrystalViewer v = new GenericCrystalViewer();
                v.Text = "ETA Report";

                ParameterFields fields = new ParameterFields();
                ParameterField field = new ParameterField();
                field.ParameterFieldName = "reportDescription";
                ParameterDiscreteValue discrete = new ParameterDiscreteValue();
                discrete.Value = friendlyConstraints;
                field.CurrentValues.Add(discrete);
                fields.Add(field);
                v.viewer.ParameterFieldInfo = fields;
                ContETAReport report = new ContETAReport();
                report.SetDataSource(dataSet);
                v.viewer.ReportSource = report;
                v.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }