Duplicate message..sorry 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of larry
> Sent: Saturday, May 23, 2009 1:08 AM
> To: [email protected]
> Subject: [dabo-users] ReportWriter - Adjusting band width 
> with hidden objects
> 
> Paul,
> I tried to do it, but I am missing something.
> 
> Basically, my idea was to capture the y-Pos value for the 
> bottom most visible object.
> Then adjust the bandwith and y-pos for the objects with the 
> difference (bandwidth minus minimun visible y-Pos)
> 
> It's almost working, but I am missing something.  Can you look at it?
> 
> Thanks,
> Larry 
> 
> --- 
> C:/Users/owner/AppData/Local/Temp/reportWriter.p-revBASE.svn00
> 1.tmp.py Sat May 23 00:57:15 2009
> +++ C:/dabo/dabo/lib/reportWriter.py Sat May 23 00:56:59 2009
> @@ -190,7 +190,7 @@
>      return val
>     else:
>      raise ValueError("Property name '%s' unrecognized." % prop)
> -
> + 
>    if self.has_key(prop):
>     if not evaluate or prop == "type":
>      return self[prop]
> @@ -1772,16 +1772,29 @@
>    # dynamic height: figure out based on the objects in the band.
>    bandHeight = 0
>    objects = bandDict.get("objects", [])
> +  
> +  #lowest_visible will hold the bottom most visible object's 
> y position  
> + lowest_visible=None
>  
>    for obj in objects:
>     obj_y = self.getPt(obj.getProp("y"))
>     obj_ht = obj.getProp("Height")
> +
>     if obj_ht is None:
>      continue
>     # object height is fixed.
>     obj_ht = self.getPt(obj_ht)
>     thisHeight = obj_y + obj_ht
>     bandHeight = max(thisHeight, bandHeight)
> +   
> +   if obj.getProp("Show"):
> +    lowest_visible = obj_y if lowest_visible is None else 
> + min(lowest_visible, obj_y)
> +    
> +  if lowest_visible is not None and lowest_visible > 0:
> +   bandHeight = bandHeight - lowest_visible
> +   for obj in objects:
> +    if obj.getProp("Show"):
> +     obj['y']= self.getPt(obj.getProp("y"))-lowest_visible
>    return bandHeight
>  
>  
> 
> 
> --- StripMime Report -- processed MIME parts --- multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
> _______________________________________________
> Post Messages to: [email protected]
> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
> Searchable Archives: http://leafe.com/archives/search/dabo-users
> This message: 
> http://leafe.com/archives/byMID/b803cbd8ccbc47bf908c9c2d4fadf...@alx
> 

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/!~!uenerkvcmdkaaqacaaaaaaaaaaaaaaaaabgaaaaaaaaaafa2fnyupuomnfpiynbeqckaaaaqaaaa8r0fbzb4tuqkpsz11lo7oaeaa...@charter.net

Reply via email to