XRLabel.Angle at Runtime
c#, devexpress, winforms, xtrareport
Solution
This seems to be working :) I am not sure why this works and my top post dont. But i copied the code which is generated by designer and now it works.
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);
Problem
iam using DevExpress v.10.2 and want to show a XRLabel on XtraReport with Angle. If iam using the Designer it is working fine. But now i want to do this at runtime, because the Label.Text is dynamic. My Problem is that the Report doesnt show my Label. I read some DevExpress Support article, which descripe that it is just working on PDF-Format. But in my case i just see a small grey line. I tried following to just populating my XRLabel for the first: ``` 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; ``` If i delete following line: ``` druckinfo.Angle = 90; ``` the Label becomes show fine but without Angle for sure. Here a Screenshot which shows the Label with top settings on the PDF: This are the settings of my Report: ``` _Report.PaperKind = PaperKind.A4; _Report.ReportUnit = ReportUnit.HundredthsOfAnInch; _Report.ShowPrintMarginsWarning = false; _Report.Margins = new Margins(0, 0, 0, 0); ``` All other Properties are on default value. The Bands which exists are following: PageHeaderBand DetailBand PageFooterBand regards