예제 #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
        /// <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;
        }
        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
 /// <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)
 {
 }