I'm using Xtrareports for reporting.
There is a paragraph that a part of it is coming from a parameter.
Let's say "Dear [USERNAME] welcome"
You see, I wasn't be able to put [USERNAME] into a paragraph. So I did it like: "Dear" [USERNAME] "welcome".
But now, if the username is short like "ab", it looks like: "Dear ab____ welcome".
If it's longer like "qwertyasdfghjkzxcvbnm", it looks like: "Dear qwertyasdfgwelcome".
How can I do this in a 开发者_JAVA技巧XtraReport file? Like a label control in Asp.net: "Hello" + USERNAME.ToString() + "welcome";
Drop an XRLabel onto a Detail band of the databound XtraReport and set the label's Text as follows:
this.xrLabel1.Text = "Dear [USERNAME] welcome";
In this case, everything should work properly. Note, in this example the USERNAME is a fieldname in the underlying DataSource.
精彩评论