US and Worldwide: +1 (866) 660-7555
Results 1 to 7 of 7

Thread: Wrapping the text in report

  1. #1

    Default Wrapping the text in report

    HI ,

    I am generating a report , by getting the data from data base , and some of the fields are having quite lengthy data in it and the report showing ... . Is there any way to show the complete data in the report by wrapping into more than one line for that filed ?.

    Thanks in Advance ..

  2. #2
    Join Date
    Mar 2003
    Posts
    7,558

    Default

    set dynamic-height style to "true" and your element will expand its height to have multiple lines.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3

    Default

    Quote Originally Posted by Taqua View Post
    set dynamic-height style to "true" and your element will expand its height to have multiple lines.
    I tried setting dynamic-height style to "true" but my element height does not get changed as per the text.It remains fixed.Kindly suggest what should I do to set the height as per the content present in that Resource-message field.

    Thanks & Regards,
    Karthik Pai

  4. #4
    Join Date
    Mar 2003
    Posts
    7,558

    Default

    Linebreaking needs spaces in the text. If you dont have any, then well, bad luck.

    If that does not help, then be more specific or give a sample report. Such a unspecific "It does not work, help me!" is not useful. If you want to ask questions as unspecific as that and want have handholding all the way to the solution, consider buying commercial support.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  5. #5

    Default

    Hi Taqua ,

    Thanks for the quick reply and Sorry for the inconvenience.

    Actually.I am trying to fetcha Device Name from my database to the Pentaho Report.The maximum allowed length of the Device Name column is 64 characters,which means that the name can be of any length of upto 64 characters.And the name may or may not have blank spaces.

    Example: Device name in Database is : "DEvice1287982374927497247070250252642642"

    When I fetch this value in my resource-message field in Pentaho report the value is displayed as "DEvice1287....."

    Now in this case how can I make my resource-message field a multiple -line element.

    Please guide me how can I handle such dynamic content with respect to the height of my "resource-message" box in my Pentaho Reports.

    Thanks & Regards!

  6. #6
    Join Date
    Mar 2003
    Posts
    7,558

    Default

    You do not have spaces in there, and thus the reporting engines cannot find a spot to break down the text. There are several JIRA cases open on that but right now there is no solution to it.

    You can try to write a BeanShell- or BSH-expression in the report and then post-process your text to insert spaces at some places. Or if you know the location of the break, then add a space there via the formula. For a break at position 10:

    =LEFT([field]; 10) & " " & RIGHT([field]; LEN([field]) - 10)
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  7. #7

    Default

    Quote Originally Posted by Taqua View Post
    You do not have spaces in there, and thus the reporting engines cannot find a spot to break down the text. There are several JIRA cases open on that but right now there is no solution to it.

    You can try to write a BeanShell- or BSH-expression in the report and then post-process your text to insert spaces at some places. Or if you know the location of the break, then add a space there via the formula. For a break at position 10:

    =LEFT([field]; 10) & " " & RIGHT([field]; LEN([field]) - 10)

    Hi Taqua,

    Thanks for the reply.

    With reference to your previous reply, I tried to implement the formula for the resource-message field.I tried to write the formula in the following Attribute Names: Field,Name,Value & also in the following Style Names: Embed,Text Wrap,Box-sizing,BreakSize.

    But all these did not work even though my Dynamic-height flag was set as true.
    In some cases my content in that resource message field disappeared and in some cases there was no effect at all.

    Can you please let me know where should I implement this formula and whether any preliminary setings are required to implement the same?

    Thanks & Regards,
    Karthik.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •