protected XRControl addRiepilogoRtf(string rtf, float location) { var leftMargin = 10F; if (_impostazioniReport.RiepilogoTopMargin != null) location += _impostazioniReport.RiepilogoTopMargin.Value; if (_impostazioniReport.RiepilogoLeftMargin != null) leftMargin += _impostazioniReport.RiepilogoLeftMargin.Value; var richText = new XRRichText { Rtf = rtf, SizeF = new SizeF(400, 100), CanShrink = true, CanGrow = true, LocationF = new PointF(leftMargin, location) }; richText.BeginInit(); _detailBand.Controls.Add(richText); richText.EndInit(); return richText; }
private XRRichText addDetailFooter(string noteRtf, float locationY) { if (!string.IsNullOrEmpty(noteRtf)) { var footer = new XRRichText { Rtf = noteRtf, SizeF = new SizeF(_report.PageWidth, 100), CanShrink = true, CanGrow = true, Width = 800, LocationF = new PointFloat(10F, locationY), }; footer.BeginInit(); if (!string.IsNullOrEmpty(_impostazioniReport.NoteBorder) && _impostazioniReport.NoteBorder != "None") { footer.BorderDashStyle = getBorderDashStyle(_impostazioniReport.NoteBorder); footer.Borders = ((BorderSide.Left | BorderSide.Top) | BorderSide.Right) | BorderSide.Bottom; footer.StylePriority.UseBorderDashStyle = false; footer.StylePriority.UseBorders = false; } if (_impostazioniReport.NoteWidth != null) footer.WidthF = _impostazioniReport.NoteWidth.GetValueOrDefault(); if (_impostazioniReport.CellPadding != null) footer.Padding = getPaddingInfo(_impostazioniReport.NotePadding); _detailBand.Controls.Add(footer); if (_impostazioniReport.NoteTopMargin != null) footer.TopF += _impostazioniReport.NoteTopMargin.Value; if (_impostazioniReport.NoteLeftMargin != null) footer.LeftF += _impostazioniReport.NoteLeftMargin.Value; footer.EndInit(); return footer; } return null; }