我正在使用DevExpress v.10.2,并希望在XtraReport上显示一个带有角度的XRLabel。如果我使用设计器,那么它可以正常工作。但是现在我想在运行时执行此操作,因为Label.Text是动态的。我的问题是报表没有显示我的标签。我阅读了一些DevExpress支持文章,描述说它只能在PDF格式上工作。但在我的情况下,我只看到一个小灰线。
我尝试了以下内容来填充我的XRLabel:
如果我删除以下行:
XRLabel druckinfo = new XRLabel();
druckinfo.Text = string.Format("SB{0} {1} EMAIL {2}", _Sachbearbeiter.Sbnr, _Kennung,
_Sachbearbeiter.Email1); //The values are filled and working.
druckinfo.Visible = true;
druckinfo.AutoWidth = false;
druckinfo.Angle = 90;
druckinfo.Font = new Font("Arial", 6f);
band.Controls.Add(druckinfo); //This is the DetailBand where i add other Labels too and its working fine.
druckinfo.HeightF = 500f; //Setting Height very high, because the text turns and i thought this is working. But seems to have no effect :(
druckinfo.LocationF = new PointF(400f, 400f);
druckinfo.Borders = DevExpress.XtraPrinting.BorderSide.All;
如果我删除以下行:
druckinfo.Angle = 90;
这里是一张屏幕截图,展示了Label在PDF上的顶部设置:
这是我的报表设置:
_Report.PaperKind = PaperKind.A4;
_Report.ReportUnit = ReportUnit.HundredthsOfAnInch;
_Report.ShowPrintMarginsWarning = false;
_Report.Margins = new Margins(0, 0, 0, 0);
所有其他属性均为默认值。存在的带有以下内容:
页面页眉带 详细信息带 页面页脚带
问候