Exemplo n.º 1
0
        protected void CrystalReportViewer1_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
        {
            getQueryString();
            printData();
            crConnectionInfo.DatabaseName = strDbname;
            crConnectionInfo.ServerName   = strServername;
            crConnectionInfo.UserID       = strDbuser;
            crConnectionInfo.Password     = strDbpassword;
            crTables = oRpt.Database.Tables;

            //apply logon info
            foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in oRpt.Database.Tables)
            {
                crTableLogOnInfo = crTable.LogOnInfo;
                crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                crTable.ApplyLogOnInfo(crTableLogOnInfo);
            }

            //apply logon info for sub report
            //foreach (Section crSection in oRpt.ReportDefinition.Sections)
            //{
            //    foreach (ReportObject crReportObject in crSection.ReportObjects)
            //    {
            //        if (crReportObject.Kind == ReportObjectKind.SubreportObject)
            //        {
            //            SubreportObject crSubReportObj = (SubreportObject)(crReportObject);

            //            foreach (CrystalDecisions.CrystalReports.Engine.Table oTable in crSubReportObj.OpenSubreport(crSubReportObj.SubreportName).Database.Tables)
            //            {
            //                crTableLogOnInfo = oTable.LogOnInfo;
            //                crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
            //                oTable.ApplyLogOnInfo(crTableLogOnInfo);
            //            }

            //        }

            //    }
            //}

            string strReportDirectoryTempPhysicalPath = Server.MapPath(this.ReportDirectoryTemp);

            Helper.DeleteUnusedFile(strReportDirectoryTempPhysicalPath, ReportAliveTime);

            string strFilename;

            strFilename = "report_" + DateTime.Now.ToString("yyyyMMddHH-mm-ss");
            oRpt.ExportToDisk(ExportFormatType.PortableDocFormat, Server.MapPath("~/temp/") + strFilename + ".pdf");
            //lnkPdfFile.NavigateUrl = "~/temp/" + strFilename + ".pdf";
            //imgPdf.Src = "~/images/icon_pdf.gif";
            //lnkExcelFile.Visible = false;
            //if (ViewState["report_code"].ToString() == "Rep_exceldebitall")
            //{
            //    oRpt.ExportToDisk(ExportFormatType.ExcelRecord, Server.MapPath("~/temp/") + strFilename + ".xls");
            //    lnkExcelFile.NavigateUrl = "~/temp/" + strFilename + ".xls";
            //    imgExcel.Src = "~/images/icon_excel.gif";
            //    lnkExcelFile.Visible = true;
            //}
            //CrystalReportViewer1.ReportSource = oRpt;
        }
Exemplo n.º 2
0
 protected void CrViewer_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     if (isNavigated)
     {
         return;
     }
     if (e.CurrentPageNumber != e.NewPageNumber)
     {
         isNavigated = true;
         CrViewer.ShowNthPage(e.NewPageNumber);
     }
 }
Exemplo n.º 3
0
        protected void DeliveryNoteViewer_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
        {
            // We need to reload the report data, fire event so that data can be re-loaded
            if (null != ReloadData)
            {
                // Create an instance of the delegate argument
                ReloadReportDataEvent reloadReportData = new ReloadReportDataEvent();

                // Call delegate
                ReloadData(ref reloadReportData);

                // See if we display the report
                if (!reloadReportData.CancelDataLoad)
                {
                    // We must be in preview mode, display report
                    showReport = true;
                }
            }
        }
Exemplo n.º 4
0
 protected void CrCollectionGraph_Bind(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     Bind();
 }
Exemplo n.º 5
0
 protected void crvReporte_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     ObtenerReporte();
     crvReporte.PageZoomFactor = 50;
 }
Exemplo n.º 6
0
 protected void crvReporte_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     //if(!bool.Parse(Session["yapasoporaquielpuntero"].ToString())) ObtenerReporte();
     //else Session["yapasoporaquielpuntero"] = false;
     ObtenerReporte();
 }
Exemplo n.º 7
0
 protected void crVwTeller_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     showReport();
 }
Exemplo n.º 8
0
 protected void crtcustomer_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     // fillReport(0);
 }
 protected void CustomerWiseAmount_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     ShowDetails();
 }
Exemplo n.º 10
0
 private void CrystalReportViewer1_Navigate(Object sedner, CrystalDecisions.Web.NavigateEventArgs e)
 {
 }
Exemplo n.º 11
0
 protected void KycFormPrint_Navigate(object sender, CrystalDecisions.Web.NavigateEventArgs e)
 {
     PrintKycForm();
 }
Exemplo n.º 12
0
 protected void crvReporte_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
 {
     ObtenerReporte();
 }