示例#1
0
 private void BOT_IMPRIMIR_Click(object sender, EventArgs e)
 {
     //entra al detalle de los Unique Code RC
     if (chk_print_unique.Checked)
     {
         using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
         {
             ReportDocument reporte = new ReportDocument();
             reporte.Load(R.PATH_FILES.PATH_REPORTS_DETALLE_RC);
             reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());
             frmReportView.crystalReportViewer1.ReportSource = reporte;
             frmReportView.crystalReportViewer1.Zoom(80);
             frmReportView.Text   = "Detalle de los Unique Code (RC)";
             frmReportView.Width  = 920;
             frmReportView.Height = 820;
             frmReportView.ShowDialog();
         }
     }
     //formato de conduce sin precio
     else if (chk_without_price.Checked)
     {
         using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
         {
             ReportDocument reporte = new ReportDocument();
             reporte.Load(R.PATH_FILES.PATH_REPORTS_FORMAT_CONDUCE_SP);
             reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());
             frmReportView.crystalReportViewer1.ReportSource = reporte;
             frmReportView.crystalReportViewer1.Zoom(150);
             frmReportView.Text   = "(Formato de Conduce Ritrama Sin precio)";
             frmReportView.Width  = 920;
             frmReportView.Height = 820;
             frmReportView.ShowDialog();
         }
     }
     //formato de conduce con precio
     else
     {
         using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
         {
             ReportDocument reporte = new ReportDocument();
             reporte.Load(R.PATH_FILES.PATH_REPORTS_FORMAT_CONDUCE);
             reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());
             frmReportView.crystalReportViewer1.ReportSource = reporte;
             frmReportView.crystalReportViewer1.Zoom(150);
             frmReportView.Text   = "Formato de Conduce Ritrama";
             frmReportView.Width  = 920;
             frmReportView.Height = 820;
             frmReportView.ShowDialog();
         }
     }
 }
示例#2
0
        private void Btn_crystal_Click(object sender, EventArgs e)
        {
            FrmReportViewCrystal frmReportView = new FrmReportViewCrystal();
            ReportDocument       reporte       = new ReportDocument();

            reporte.Load(Application.StartupPath + @"\Reports\ConduceConPrecio.rpt");
            frmReportView.crystalReportViewer1.ReportSource = reporte;
            frmReportView.Refresh();
            frmReportView.crystalReportViewer1.Zoom(80);
            frmReportView.Text   = "Detalle de los Unique Code (RC)";
            frmReportView.Width  = 900;
            frmReportView.Height = 700;
            frmReportView.Refresh();
            frmReportView.ShowDialog();
        }
示例#3
0
        private void Btn_crystal_Click(object sender, EventArgs e)
        {
            FrmReportViewCrystal frmReportView = new FrmReportViewCrystal();
            ReportDocument       reporte       = new ReportDocument();

            //TableLogOnInfos crtablelogoninfos = new TableLogOnInfos();
            //TableLogOnInfo crtablelogoninfo = new TableLogOnInfo();

            reporte.Load(Application.StartupPath + @"\Reports\ConduceConPrecio.rpt");
            //reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());

            //Tables CrTables;
            //CrTables = reporte.Database.Tables;

            //ConnectionInfo ConexInfo = new ConnectionInfo
            //{
            //    ServerName = R.SERVERS.SERVER_RITRAMA,
            //    DatabaseName = R.DATABASES.RITRAMA,
            //    UserID = R.USERS.UserMaster,
            //    Password = R.USERS.KeyMaster
            //};

            //foreach (Table table in CrTables)
            //{
            //    crtablelogoninfo = table.LogOnInfo;
            //    crtablelogoninfo.ConnectionInfo = ConexInfo;
            //    table.ApplyLogOnInfo(crtablelogoninfo);
            //}


            frmReportView.crystalReportViewer1.ReportSource = reporte;
            frmReportView.Refresh();
            frmReportView.crystalReportViewer1.Zoom(80);
            frmReportView.Text   = "Detalle de los Unique Code (RC)";
            frmReportView.Width  = 900;
            frmReportView.Height = 700;
            frmReportView.Refresh();
            frmReportView.ShowDialog();
        }
示例#4
0
        private void BOT_IMPRIMIR_Click(object sender, EventArgs e)
        {
            //entra al detalle de los Unique Code RC
            if (chk_print_unique.Checked)
            {
                using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
                {
                    ReportDocument  reporte           = new ReportDocument();
                    TableLogOnInfos crtablelogoninfos = new TableLogOnInfos();
                    TableLogOnInfo  crtablelogoninfo  = new TableLogOnInfo();

                    reporte.Load(Application.StartupPath + R.PATH_FILES.PATH_REPORTS_DETALLE_RC);
                    reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());

                    Tables CrTables;
                    CrTables = reporte.Database.Tables;

                    ConnectionInfo ConexInfo = new ConnectionInfo
                    {
                        ServerName   = R.SERVERS.SERVER_RITRAMA,
                        DatabaseName = R.DATABASES.RITRAMA,
                        UserID       = R.USERS.UserMaster,
                        Password     = R.USERS.KeyMaster
                    };

                    foreach (Table table in CrTables)
                    {
                        crtablelogoninfo = table.LogOnInfo;
                        crtablelogoninfo.ConnectionInfo = ConexInfo;
                        table.ApplyLogOnInfo(crtablelogoninfo);
                    }


                    frmReportView.crystalReportViewer1.ReportSource = reporte;
                    frmReportView.Refresh();
                    frmReportView.crystalReportViewer1.Zoom(80);
                    frmReportView.Text   = "Detalle de los Unique Code (RC)";
                    frmReportView.Width  = 900;
                    frmReportView.Height = 700;
                    frmReportView.Refresh();
                    frmReportView.ShowDialog();
                }
            }
            //formato de conduce sin precio
            else if (chk_without_price.Checked)
            {
                using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
                {
                    ReportDocument  reporte           = new ReportDocument();
                    TableLogOnInfos crtablelogoninfos = new TableLogOnInfos();
                    TableLogOnInfo  crtablelogoninfo  = new TableLogOnInfo();

                    reporte.Load(Application.StartupPath + R.PATH_FILES.PATH_REPORTS_FORMAT_CONDUCE_SP);
                    reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());

                    Tables CrTables;
                    CrTables = reporte.Database.Tables;

                    ConnectionInfo ConexInfo = new ConnectionInfo
                    {
                        ServerName   = R.SERVERS.SERVER_RITRAMA,
                        DatabaseName = R.DATABASES.RITRAMA,
                        UserID       = R.USERS.UserMaster,
                        Password     = R.USERS.KeyMaster
                    };

                    foreach (Table table in CrTables)
                    {
                        crtablelogoninfo = table.LogOnInfo;
                        crtablelogoninfo.ConnectionInfo = ConexInfo;
                        table.ApplyLogOnInfo(crtablelogoninfo);
                    }

                    frmReportView.crystalReportViewer1.ReportSource = reporte;
                    frmReportView.crystalReportViewer1.Zoom(140);
                    frmReportView.Text   = "(Formato de Conduce Ritrama Sin precio)";
                    frmReportView.Width  = 900;
                    frmReportView.Height = 700;
                    frmReportView.ShowDialog();
                }
            }
            //formato de conduce con precio
            else
            {
                using (FrmReportViewCrystal frmReportView = new FrmReportViewCrystal())
                {
                    ReportDocument reporte = new ReportDocument();

                    TableLogOnInfos crtablelogoninfos = new TableLogOnInfos();
                    TableLogOnInfo  crtablelogoninfo  = new TableLogOnInfo();

                    reporte.Load(Application.StartupPath + R.PATH_FILES.PATH_REPORTS_FORMAT_CONDUCE);
                    reporte.SetParameterValue("NUMERO", txt_numero_despacho.Text.Trim());

                    ConnectionInfo ConexInfo = new ConnectionInfo
                    {
                        ServerName   = "ritramasrv01",
                        DatabaseName = "ritrama",
                        UserID       = "Npino",
                        Password     = "******"
                    };

                    Tables CrTables;
                    CrTables = reporte.Database.Tables;


                    foreach (Table table in CrTables)
                    {
                        crtablelogoninfo = table.LogOnInfo;

                        crtablelogoninfo.ConnectionInfo = ConexInfo;
                        table.ApplyLogOnInfo(crtablelogoninfo);
                    }

                    frmReportView.crystalReportViewer1.ReportSource = reporte;
                    frmReportView.crystalReportViewer1.Zoom(140);
                    frmReportView.Text   = "Formato de Conduce Ritrama";
                    frmReportView.Width  = 900;
                    frmReportView.Height = 700;
                    frmReportView.Refresh();
                    frmReportView.ShowDialog();
                }
            }
        }