示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportPass rpt = new CrystalReportPass();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
 public Report1()
 {
     InitializeComponent();
     this.MyCrystalReportViewer.BackColor = System.Drawing.Color.AliceBlue;
     crystal = new CrystalReportPass();
     load_db(crystal);
     load_pass(crystal, "66003");//variabel yang di passing
     load_view(crystal);
 }
示例#3
0
 public Report1()
 {
    InitializeComponent();
    this.MyCrystalReportViewer.BackColor = System.Drawing.Color.AliceBlue;
    crystal = new CrystalReportPass();
    load_db(crystal);
    load_pass(crystal,"66003");//variabel yang di passing
    load_view(crystal);
 }
示例#4
0
        private void load_pass(CrystalReportPass crystal, string val)
        {
            ParameterFieldDefinitions crParameterFieldDefinitions;
            ParameterFieldDefinition  crParameterFieldDefinition;
            ParameterValues           crParameterValues        = new ParameterValues();
            ParameterDiscreteValue    crParameterDiscreteValue = new ParameterDiscreteValue();

            crParameterDiscreteValue.Value = val;
            crParameterFieldDefinitions    = crystal.DataDefinition.ParameterFields;
            crParameterFieldDefinition     = crParameterFieldDefinitions["idresep"];
            crParameterValues = crParameterFieldDefinition.CurrentValues;

            crParameterValues.Clear();
            crParameterValues.Add(crParameterDiscreteValue);
            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
        }
示例#5
0
      private void load_pass(CrystalReportPass crystal, string val)
      {
         ParameterFieldDefinitions crParameterFieldDefinitions;
         ParameterFieldDefinition crParameterFieldDefinition;
         ParameterValues crParameterValues = new ParameterValues();
         ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();

         crParameterDiscreteValue.Value = val;
         crParameterFieldDefinitions = crystal.DataDefinition.ParameterFields;
         crParameterFieldDefinition = crParameterFieldDefinitions["idresep"];
         crParameterValues = crParameterFieldDefinition.CurrentValues;

         crParameterValues.Clear();
         crParameterValues.Add(crParameterDiscreteValue);
         crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
      }
示例#6
0
        private void load_db(CrystalReportPass crystal)
        {
            TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
            ConnectionInfo crConnectionInfo = new ConnectionInfo();
            Tables         CrTables;

            crConnectionInfo.ServerName   = "127.0.0.1";
            crConnectionInfo.DatabaseName = "";
            crConnectionInfo.UserID       = "basdat";
            crConnectionInfo.Password     = "******";

            CrTables = crystal.Database.Tables;
            foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
            {
                crtableLogoninfo = CrTable.LogOnInfo;
                crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                CrTable.ApplyLogOnInfo(crtableLogoninfo);
            }
        }
示例#7
0
      private void load_db(CrystalReportPass crystal)
      {
         TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
         ConnectionInfo crConnectionInfo = new ConnectionInfo();
         Tables CrTables;

         crConnectionInfo.ServerName = "127.0.0.1";
         crConnectionInfo.DatabaseName = "";
         crConnectionInfo.UserID = "basdat";
         crConnectionInfo.Password = "******";

         CrTables = crystal.Database.Tables;
         foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
         {
            crtableLogoninfo = CrTable.LogOnInfo;
            crtableLogoninfo.ConnectionInfo = crConnectionInfo;
            CrTable.ApplyLogOnInfo(crtableLogoninfo);
         }
      }
示例#8
0
 private void load_view(CrystalReportPass crystal)
 {
     MyCrystalReportViewer.ReportSource = crystal;
     MyCrystalReportViewer.Refresh();
 }
示例#9
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     CrystalReportPass rpt = new CrystalReportPass();
     rpt.Site = this.Site;
     return rpt;
 }
示例#10
0
 private void load_view(CrystalReportPass crystal)
 {
    MyCrystalReportViewer.ReportSource = crystal;
    MyCrystalReportViewer.Refresh();
 }