Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Crosstab output format
domorodac
<p>Hi,</p>
<p> </p>
<p>in crosstab summarized and total field I need to have output like 145:30 h. Which means 145 hours and 30 minutes. I was able to get output 145.5 h. Field format properties for number, date or string didn't help. You can say I'm novice in BIRT design.</p>
<p> </p>
<p>Any help is appreciated.</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>You cannot directly format a float into a time format. One workaround is to transform the float value into a string that corresponds to hours and minutes. The following expression in a Dynamic Text element will work:</p>
<p> </p>
<div>x = data["SALES_Group/Year"]</div>
<div>h = Math.floor(x);</div>
<div>m = x - h;</div>
<div>m = Math.round(m * 60);</div>
<div>rslt = h + ":" + (m < 10 ? "0" : "") + m + " h";</div>
<div> </div>
<div>You can add the Dynamic Text element in the cell that has the original crosstab value and hide the original crosstab value.</div>
<div> </div>
<div>Here's a screenshot of what this would look like in Design:</div>
<div> </div>
<div>
domorodac
<p>Hi,</p>
<p> </p>
<p>This is exactly what I needed. Thank you very much.</p>
<p> </p>
<p>Miro</p>