iam使用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;标签会显示得很好,但不一定有角度。
这里是一个屏幕快照,它显示了PDF上顶部设置的标签:

以下是我的报告的设置:
_Report.PaperKind = PaperKind.A4;
_Report.ReportUnit = ReportUnit.HundredthsOfAnInch;
_Report.ShowPrintMarginsWarning = false;
_Report.Margins = new Margins(0, 0, 0, 0);所有其他属性都是默认值。现有的乐队如下:
PageHeaderBand DetailBand PageFooterBand
问候
发布于 2013-12-18 07:39:53
这似乎很有效:)我不知道为什么这样做,而我的最高职位却不行。但是我复制了由设计人员生成的代码,现在它开始工作了。
XRLabel druckinfo = new XRLabel();
druckinfo.Angle = 90F;
druckinfo.Padding = new PaddingInfo(2, 2, 0, 0, 96F);
druckinfo.SizeF = new SizeF(29.16666F, 500F);
druckinfo.Font = new Font("Arial",8f);
druckinfo.Text = text;
_Band.Controls.Add(druckinfo);
druckinfo.LocationF = new PointF(0F, 500F);https://stackoverflow.com/questions/20497005
复制相似问题