コード例 #1
0
        public static Report ToReport(this IReportSource source, string format)
        {
            // TODO: Add error handling, central config place to load Providers
            var writer = Activator.CreateInstance(Config.Report.Writers[format].Type) as IReportWriter;

            return(new Report(source, writer));
        }
コード例 #2
0
ファイル: Report.cs プロジェクト: henrim/DoddleReport
        /// <summary>
        /// Create a new report by using a specific report source and report writer
        /// </summary>
        /// <param name="source">The data for the report</param>
        /// <param name="writer">The type of writer used to render the report</param>
        public Report(IReportSource source, IReportWriter writer)
        {
            if (source != null)
            {
                _source    = source;
                DataFields = source.GetFields() ?? new ReportFieldCollection();
            }

            Writer = writer;
        }
コード例 #3
0
        internal ReportRow(ReportRowType rowType, ReportFieldCollection fields, IReportSource source, object dataItem)
        {
            RowType  = rowType;
            DataItem = dataItem;

            Fields = new RowFieldCollection(fields);
            foreach (ReportField field in fields)
            {
                RowField rowField = new RowField(field);
                _fieldData[rowField] = source.GetFieldValue(dataItem, field.Name);
            }
        }
コード例 #4
0
        public ImplFilter(IEnvironment pEnv, IReportSource pRepSource, FilterInfo pInfo)
        {
            _environment = pEnv;
            _repSource   = pRepSource;
            _info        = pInfo;
            switch (_info.type)
            {
            case FilterInfo.fTypeRef:
                break;

            case FilterInfo.fTypeRefParam:
                break;

            case FilterInfo.fTypeConst:
            case FilterInfo.fTypeSysConst:
                begin();
                break;
            }
        }
コード例 #5
0
        public static Report ToReport(this IReportSource source, string format)
        {
            var writer = Config.Report.Writers.GetWriterByName(format);

            return(new Report(source, writer));
        }
コード例 #6
0
ファイル: Report.cs プロジェクト: henrim/DoddleReport
 /// <summary>
 /// Create a new report by using a specific report source
 /// </summary>
 /// <param name="source">The data for the report</param>
 public Report(IReportSource source) : this(source, null)
 {
 }