Exemple #1
0
 public CrystalViewer(EMDataSet dataSet,bool isPO)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     ParameterFields fields=  new ParameterFields();
     ParameterField field = new ParameterField();
     field.ParameterFieldName = "isPO";
     ParameterDiscreteValue discrete = new ParameterDiscreteValue();
     discrete.Value = isPO;
     field.CurrentValues.Add(discrete);
     fields.Add(field);
     CrystalReport1 c = new CrystalReport1();
     crystalReportViewer1.ParameterFieldInfo = fields;
     EMDataSet copy = (EMDataSet)dataSet.Copy();
     c.SetDataSource(copy);
     crystalReportViewer1.ReportSource = c;
     //
     // TODO: Add any constructor code after InitializeComponent call
     //
 }
Exemple #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     CrystalReport1 rpt = new CrystalReport1();
     rpt.Site = this.Site;
     return rpt;
 }