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)); }
/// <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); } }
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; } }
public static Report ToReport(this IReportSource source, string format) { var writer = Config.Report.Writers.GetWriterByName(format); return(new Report(source, writer)); }
/// <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) { }