コード例 #1
0
ファイル: WebEasilyReport.cs プロジェクト: san90279/UK_OAS
 internal string GetOutputUrl(ReportFormat.ExportType outputFormat)
 {
     string strUrl = this.Page.AppRelativeVirtualPath.Substring(0, this.Page.AppRelativeVirtualPath.LastIndexOf("/") + 1);
     strUrl += outputFormat.ToString() + "Doc/";
     strUrl += Path.GetFileName(this.GetOutputPath(outputFormat));
     return strUrl;
 }
コード例 #2
0
ファイル: WebEasilyReport.cs プロジェクト: san90279/UK_OAS
        internal string GetOutputPath(ReportFormat.ExportType outputFormat)
        {
            string path = this.Page.MapPath(this.Page.AppRelativeVirtualPath);
            string directory = Path.GetDirectoryName(path);
            string filename = Path.GetFileNameWithoutExtension(path);
            string extension = String.Empty;
            string dir = String.Empty;
            if (outputFormat == ReportFormat.ExportType.Excel)
            {
                extension = "xls";
            }
            else
            {
                extension = "pdf";
            }

            dir = directory + "\\" + outputFormat.ToString() + "Doc";

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            path = string.Format("{0}\\" + outputFormat.ToString() + "Doc\\{1}", directory, string.Format("{0}-{1:yyMMddHHmmss}", filename, DateTime.Now));
            path = Path.ChangeExtension(path, extension);
            return path;
        }
コード例 #3
0
ファイル: ReportFormat.cs プロジェクト: san90279/UK_OAS
 public void CopyTo(ReportFormat reportFormat)
 {
     reportFormat.ColumnGap = this.ColumnGap;
     reportFormat.ColumnGridLine = this.ColumnGridLine;
     reportFormat.ColumnInsideGridLine = this.ColumnInsideGridLine;
     reportFormat.DateFormat = this.DateFormat;
     reportFormat.ExportFormat = this.ExportFormat;
     reportFormat.MarginLeft = this.MarginLeft;
     reportFormat.MarginRight = this.MarginRight;
     reportFormat.MarginTop = this.MarginTop;
     reportFormat.MarginBottom = this.MarginBottom;
     reportFormat.Orientation = this.Orientation;
     reportFormat.PageHeight = this.PageHeight;
     reportFormat.PageIndexFormat = this.PageIndexFormat;
     reportFormat.PageRecords = this.PageRecords;
     reportFormat.PageSize = this.PageSize;
     reportFormat.RowGap = this.RowGap;
     reportFormat.RowGridLine = this.RowGridLine;
     reportFormat.UserFormat = this.UserFormat;
 }
コード例 #4
0
ファイル: WebEasilyReport.cs プロジェクト: san90279/UK_OAS
        public WebEasilyReport()
        {
            headerItems = new ReportItemCollection(this);
            footerItems = new ReportItemCollection(this);

            fieldItems = new DataSourceItemCollection(this);
            dataSource = new WebDataSourceItemCollection(this);
            mailSetting = new MailConfig();
            format = new ReportFormat();
            parameters = new ParameterItemCollection();
            images = new ImageItemCollection();
            dbGateway = new DBGateway(this);
            serializer = new BinarySerialize();

            this.reportID = ComponentInfo.DefaultReportID + DateTime.Now.ToString("yyyyMMdd");
            this.reportName = "";

            fontConvert = new FontConverter();
            Visible = false;

            if (this.UIType == EasilyReportUIType.AspNet)
            {
                render = new AspNetRender(this);
            }
            else
            {
                render = new ExtJsRender(this);
            }
        }
コード例 #5
0
ファイル: ReportFormat.cs プロジェクト: san90279/UK_OAS
 public ReportFormat Copy()
 {
     ReportFormat reportFormat = new ReportFormat();
     CopyTo(reportFormat);
     return reportFormat;
 }