Esempio n. 1
0
        private void Export(ExportFormatType pvtExportFormatType)
        {
            if (string.IsNullOrEmpty(lblReferrer.ToolTip))
            {
                return;
            }

            ReportDocument rpt = getReportDocument();

            string strUnparsedTask = lblReferrer.ToolTip;
            string task            = strUnparsedTask;

            if (strUnparsedTask.ToLower() != "transaction")
            {
                task = Common.Decrypt(strUnparsedTask, Session.SessionID);
            }

            SetDataSource(rpt, task);

            if (pvtExportFormatType == ExportFormatType.WordForWindows || pvtExportFormatType == ExportFormatType.Excel || pvtExportFormatType == ExportFormatType.PortableDocFormat)
            {
                string strFileName = Session["UserName"].ToString() + "_products";
                CRSHelper.GenerateReport(strFileName, rpt, this.updPrint, pvtExportFormatType);
            }
            else
            {
                CRViewer.ReportSource     = rpt;
                Session["ReportDocument"] = rpt;
            }
        }
Esempio n. 2
0
        private void Export(ExportFormatType pvtExportFormatType)
        {
            ReportDocument rpt = getReportDocument();

            SetDataSource(rpt);

            if (pvtExportFormatType == ExportFormatType.WordForWindows || pvtExportFormatType == ExportFormatType.Excel || pvtExportFormatType == ExportFormatType.PortableDocFormat)
            {
                string strFileName = Session["UserName"].ToString() + "poreturn";
                CRSHelper.GenerateReport(strFileName, rpt, this.updPrint, pvtExportFormatType);
            }
            else
            {
                CRViewer.ReportSource     = rpt;
                Session["ReportDocument"] = rpt;
            }
        }
Esempio n. 3
0
        private void Export(ExportFormatType pvtExportFormatType)
        {
            ReportDocument rpt = new ReportDocument();

            rpt.Load(Server.MapPath(Constants.ROOT_DIRECTORY + "/Reports/_StockTransactionReport.rpt"));

            SetDataSource(rpt);

            ExportOptions exportop          = new ExportOptions();
            DiskFileDestinationOptions dest = new DiskFileDestinationOptions();
            string strPath = Server.MapPath(@"\retailplus\temp\");
            string strFileExtensionName = ".pdf";

            switch (pvtExportFormatType)
            {
            case ExportFormatType.PortableDocFormat: strFileExtensionName = ".pdf"; exportop.ExportFormatType = ExportFormatType.PortableDocFormat; break;

            case ExportFormatType.WordForWindows: strFileExtensionName = ".doc"; exportop.ExportFormatType = ExportFormatType.WordForWindows; break;

            case ExportFormatType.Excel: strFileExtensionName = ".xls"; exportop.ExportFormatType = ExportFormatType.Excel; break;
            }
            string strFileName = "tranreport_" + Session["UserName"].ToString() + "_" + DateTime.Now.ToString("yyyyMMddhhmmssff") + strFileExtensionName;

            if (System.IO.File.Exists(strPath + strFileName))
            {
                System.IO.File.Delete(strPath + strFileName);
            }

            dest.DiskFileName              = strPath + strFileName;
            exportop.DestinationOptions    = dest;
            exportop.ExportDestinationType = ExportDestinationType.DiskFile;
            rpt.Export(exportop); //rpt.Close(); rpt.Dispose();

            if (pvtExportFormatType == ExportFormatType.PortableDocFormat)
            {
                rpt.Close(); rpt.Dispose();
                Response.Redirect(Constants.ROOT_DIRECTORY + "/temp/" + strFileName, false);
            }
            else
            {
                CRViewer.ReportSource     = rpt;
                Session["ReportDocument"] = rpt;
                CRSHelper.OpenExportedReport(strFileName); // OpenExportedReport(strFileName);
            }
        }
Esempio n. 4
0
        private void Export(ExportFormatType pvtExportFormatType)
        {
            ReportDocument rpt = getReportDocument();

            SetDataSource(rpt);

            if (pvtExportFormatType == ExportFormatType.WordForWindows || pvtExportFormatType == ExportFormatType.Excel || pvtExportFormatType == ExportFormatType.PortableDocFormat)
            {
                string strFileName = Session["UserName"].ToString() + "_credit";

                switch (cboReportType.SelectedItem.Value)
                {
                case ReportTypes.CREDITS_Purchases:
                    strFileName += "purchases";
                    break;

                case ReportTypes.CREDITS_Payments:
                    strFileName += "payments";
                    break;

                case ReportTypes.CREDITS_CreditorsLedgerSummary:
                    strFileName += "ledger";
                    break;

                case ReportTypes.CustomerCreditSummarizedStatistics:
                    strFileName += "stat";
                    break;

                default:
                    break;
                }

                CRSHelper.GenerateReport(strFileName, rpt, this.updPrint, pvtExportFormatType);
            }
            else
            {
                CRViewer.ReportSource     = rpt;
                Session["ReportDocument"] = rpt;
            }
        }
Esempio n. 5
0
        private void Export(ExportFormatType pvtExportFormatType)
        {
            if (string.IsNullOrEmpty(txtTransactionNo.Text))
            {
                return;
            }

            ReportDocument rpt = getReportDocument();

            SetDataSource(rpt);

            if (pvtExportFormatType == ExportFormatType.WordForWindows || pvtExportFormatType == ExportFormatType.Excel || pvtExportFormatType == ExportFormatType.PortableDocFormat)
            {
                string strFileName = Session["UserName"].ToString() + "_salesrcvbles";
                CRSHelper.GenerateReport(strFileName, rpt, this.updPrint, pvtExportFormatType);
            }
            else
            {
                CRViewer.ReportSource     = rpt;
                Session["ReportDocument"] = rpt;
            }
        }