Stefan Bättig
08.03.2012
Hello Stefan.
Thank you for your message. To solve this issue, pass your "name" value to the xrLabel.Site.Name property after adding this label to a Container:
[VB.NET]Private Function CreateLabel(name As String, controlDestination As XRControlCollection, binding As XRBinding) As XRLabel Dim xrLabel As New XRLabel Dim host As IDesignerHost = CType(XrDesignMdiController1.ActiveDesignPanel.Report.Site.GetService(GetType(IDesignerHost)), IDesignerHost) Dim rep As XtraReport = CType(host.RootComponent, XtraReport) ' Im Designer hinzufügen, damit die Controls selektiert und Properties verändert werden können DesignToolHelper.AddToContainer(host, xrLabel) If binding IsNot Nothing Then xrLabel.DataBindings.Add(binding) End If xrLabel.LocationF = New PointF(50, 50) xrLabel.Dpi = 254.0! 'xrLabel.Name = name xrLabel.Site.Name = name 'Add this line xrLabel.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254.0!) xrLabel.StylePriority.UsePadding = False xrLabel.Text = "" controlDestination.Add(xrLabel) Return xrLabel End Function
We look forward to your feedback once you have had the opportunity to try our solution.
Hi Stefan,
Adjust the XRLabel.Name property to fix this issue. We look forward to your feedback once you have had the opportunity to try this approach.
-
i did it already. see my code!
-
I suggest that you define XRLabel.Name property after calling DesignToolHelper.AddToContainer method. If it does not help you, please post a sample project that illustrates the problem. We will examine it and try to find an appropriate solution for you.
-
show my sample. it seems to be a bug.
do you have a workaround for me?
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+