public StyleElement this[ReportRowType rowType]
 {
     get
     {
         return(this[rowType.ToString()]);
     }
 }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
0
        internal ReportRow(Report report, ReportRowType rowType, object dataItem)
        {
            Report   = report;
            RowType  = rowType;
            DataItem = dataItem;

            Fields = new RowFieldCollection(this);
            foreach (var field in report.DataFields)
            {
                var rowField = new RowField(this, field);
                var value    = report.Source.GetFieldValue(dataItem, field.Name) ?? string.Empty;
                _rowFieldData[rowField] = value;
            }
        }
        // TODO: Move this to central config or something
        public ReportStyle(ReportRowType rowType)
        {
            switch (rowType)
            {
            case ReportRowType.DataRow:
                ApplyStyle(Config.Report.Styles[Config.Report.DataRowStyleName]);
                break;

            case ReportRowType.FooterRow:
                ApplyStyle(Config.Report.Styles[Config.Report.FooterRowStyleName]);
                break;

            case ReportRowType.HeaderRow:
                ApplyStyle(Config.Report.Styles[Config.Report.HeaderRowStyleName]);
                break;
            }
        }