ActiveReports for .NET 3.0 Support

Started by khvobdayoupxda at 06-24-2009 5:58 AM. Topic has 18 replies.

Print Search Rate
Sort Posts:    
   06-24-2009, 5:58 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Italic and right-aligned text in textbox appears cut

Attachment: Immagine.PNG
Hello,
if I put some text in a left-aligned textbox, text appears cut at top-right corner. It happens only with some letters (W, T) with a top-right "appendix" and not with others (A for instance). Seems that textbox doesn't consider the fact that an italic letter can be wider than the regular counterpart.

It is visible both in design and at runtime. You can find a screenshot attached, picturing this issue.

Any workaround? Putting a space at the end of the text doesn't work, spaces are ignored.

Thanks in advance.

mt


   Report 
   06-24-2009, 1:29 PM
SandeepS is not online. Last active: 6/22/2009 3:57:37 PM SandeepS

Top 50 Posts
Joined on 12-11-2008
Posts 269

DDStaff
Re: Italic and right-aligned text in textbox appears cut
Hello,

This is a known issue and we already have an existing Case 21565 in our system to address it but we can not provide an estimate to when it will be addressed.I have added your email address to the affected user list.

Currently if you would like to be notified when a new build has been released
which may contain a fix you can subscribe to receive ActiveReports announcements here:
http://www.datadynamics.com/forums/54/ShowForum.aspx

Regards,
Sandeep
   Report 
   06-25-2009, 1:12 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut
Thank you, Sandeep.
Any workaround, meanwhile? I mean, something like adding a white space or non printable char, after the last letter, as I said..?

   Report 
   06-26-2009, 7:31 AM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 757

DDStaff
Re: Italic and right-aligned text in textbox appears cut

Attachment: MeasureText.zip
Hello,

Which build of ActiveReports for .NET 3.0 are you using? If you are on an earlier build then, please upgrade to the latest one:-5.2.1236 from this link. Further, you could use the MeasureText method to calculate the width and height of the text input and set the width of the textbox accordingly. You may take a look at this help document regarding this method. Please take a look at the attached sample in this regard.

Regards,
Prantik


   Report 
   07-09-2009, 6:15 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut

Attachment: Immagine.PNG
Hello again,
this issue occurs with the latest build, 5.2.1236.
How can the MeasureText can help me? Textboxes are still larger then written text, with this method I can only "fit" textbox width, but right-aligned italic text still gets cropped..


   Report 
   07-10-2009, 2:45 AM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 757

DDStaff
Re: Italic and right-aligned text in textbox appears cut
Hello,

I apologise for the confusion here. As previously mentioned, we have an open Case 25688 in this regard and your email has already been attached to the list of affected users. As a workaround for this behaviour, you could add a blank space at the end of the string to prevent the w or t to cut off. Please write code as such

Private Sub Detail1_Format(ByVal sender As System. Object, ByVal e As System.EventArgs) Handles Detail1.Format
        If Me.TextBox.Text.EndsWith ("W") = True Or Me.TextBox.Text.EndsWith ("T") = True Then
            Me.TextBox.Text = Me.TextBox.Text & ChrW (0)
        End If
  End Sub

Regards,
Prantik


   Report 
   07-16-2009, 7:36 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut
Hello Prantik,
adding a space at the end of the sentence, with
+ (char)32
and also
+ " "
doesn't work, it still cuts letters.

Adding any non-printable ascii char, 0, 10 and so on, results in a small square being printed (you know, the placeholder square char).

Even if I add lot of spaces this happens: putting any printable char at the end of this string, say: "my string             .", effectively moves the whole string to the right, showing spaces. In the end, it seems to me that spaces are trimmed, just before being added to report.

   Report 
   07-17-2009, 5:36 AM
GauravC is not online. Last active: 1/8/2010 3:02:42 PM GauravC

Top 25 Posts
Joined on 12-11-2008
Posts 579

DDStaff
Re: Italic and right-aligned text in textbox appears cut
Hello,

If it doesn't work for you in that case we need to wait till the above mentioned case get's fixed. In the mean time I will look for another workaround and update you if I get anything to overcome this issue.

Thanks,
Gaurav
   Report 
   07-17-2009, 5:43 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut
Thank you Gaurav!

   Report 
   07-20-2009, 11:52 AM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 757

DDStaff
Re: Italic and right-aligned text in textbox appears cut

Attachment: rightaligneditalicletter.zip


Hello,

You could try adding a ChrW(0) to the end of the text of the textbox that is right aligned and ends in italic W or T. Please take a look at the attached sample.

Regards,
Prantik
   Report 
   07-21-2009, 7:59 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut
PrantikS,
as I said before I already tried adding a (char)0 to the end of the text. AFAIK the corresponding C# function of ChrW is (char) - convert to char. Please correct me if I'm wrong.

TIA,
mt

   Report 
   07-21-2009, 8:10 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut

Attachment: Immagine.JPG
To avoid any confusion, I also tried to use Microsoft.VisualBasic.Strings.ChrW(0) but, again as I said before, a small square appears instead of the space I expected.
Please find attached a screenshot to better understand what I mean (taken from the sample solution you posted, upgraded to VS2008)

Thank you again,
mt

EDIT: I also have to add that I don't use GAC placed assemblies but I drop them in my solution and reference from there. I don't know if this results in something useful here, but I add this note to give a more complete scenario.



   Report 
   07-22-2009, 9:05 AM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 757

DDStaff
Re: Italic and right-aligned text in textbox appears cut
Hello,

I apologise for the confusion so far, as I was testing the application in VS 2005 and workaround could be implemented therein. After further investigation, I have observed that this issue is not specific to ActiveReports only. If you use the right-aligned TextBox with text such as “WWWWW” in a normal .NET application you would observe that the last letter gets cut off as well.

Regards,
Prantik


   Report 
   07-22-2009, 10:05 AM
khvobdayoupxda is not online. Last active: 12/3/2009 12:45:31 AM khvobdayoupxda

Not Ranked
Joined on 06-16-2009
Posts 19
Re: Italic and right-aligned text in textbox appears cut
Hello Prantik,
even if this can be true in VS2005 (in VS2008 this does'n happen, it displays correctly, mine at least), I can always add a space at the end of the .Text property; Windows Forms Textbox correctly add that space.

AR actually trims this space, making unuseful this workaround.

mt

   Report 
   07-22-2009, 1:31 PM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 757

DDStaff
Re: Italic and right-aligned text in textbox appears cut

Attachment: italictextcutsoff.zip
Hello,

You could try adding (char)1 to the end of the text of the "wwww" in italics to avoid the last letter from cutting of. Please take a look at the attached VS 2008 sample.

Regards,
Prantik


   Report 
  Page 1 of 2 (19 items) 1 2 >
GrapeCity » Product Support » ActiveReports f... » Italic and right-aligned text in textbox appears cut

Privacy Policy | Copyright © 1997-2010 - GrapeCity, inc.