Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: problem about the static image

  1. #1
    Join Date
    Jun 2009
    Posts
    116

    Default problem about the static image

    Hello every ,
    I use the pentaho report designer 3.0.0 to generate the report , it works very well . But now I have a question about the element of Static Image.
    As you known , every report have a logo picture in the report header. Usually , we need the logo picture to be placed in the middle of the report header. I usually use the element of Static Image in the report designer to show the logo picture , I just set the position and size , then select a url file path.
    But the logo picture is different from one to another. For example, some is rectangle, some is square . Also the size of the logo is different from one to another.
    So there is the problem. I have set the size of the logo, but when I change another logo , and the logo’s size is bigger. The logo will be compressed, so it will not be seen cleanly .
    Any more questions, I have another question. In other elements , textfield etc. , we can set the horizontal alignment , and vertical alignment, to control the word position . But in the Static Image , I can only set the position , and the size , so the picture will be show in the starting point from the top left corner of the static image . It means that , maybe for some logo which width is bigger will be shown in the middle , and for another one which width is small will be shown in the left .
    I have been puzzled by this problem for some days .Is there anyone who can deal with this problem? Please give me the advices.

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Set "scale" to false and "dynamic-height" to true. This will adapt the height of the element to the height of the image. Scale to false makes sure that the image wont be crunched into the element.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Jun 2009
    Posts
    116

    Default

    hello Taqua , I have do what you said . It is really work now .
    But now , there is another problem is that , under the logo picture is my report name , I have set the "scale" to false and "dynamic-height" to true .If the logo picture's height is bigger than the static image,the logo will show the size with its really value . In this way , the report name under the logo picture will be covered by the logo .
    So this is my request: I will set the a Static Image element to show the logo picture , if the logo's size is smaller than the Static Image , it will show the logo 's show, if the logo's size is bigger than the Static Image , it will show the Static Image's by compress the logo.
    How can I deal with this.Need for the advice . Thanks for the any one who can help me .

  4. #4
    Join Date
    Jun 2009
    Posts
    116

    Default

    In my opinion , it is best of that.
    I set the Static Image's width is equal with the page's width , I have set a max height , if the logo's height is less than the Static Image's height , the logo can be shown in the center , just like the text-field's alignment attribute .
    if the logo's height is bigger than the Static Image's height, the logo will be compress by scale ,and to be shown in the center .
    This is what i need to accomplish in my report , if it is feasible , we don't need to resize the Static Image for every report when we change the logo picture.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.