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)
Cross tab format question
oraBirt
<p>Birt version is 3.7.</p>
<p>Could anybody teach how to make crosstab data column size to fit the data, not too big. For example, the following 123, and 456 is the derived avg data, and the other columns are hidden, but it looks like this:</p>
<p>| row1 | 123 |</p>
<p>| row2 | 456 |</p>
<p> </p>
<p>the ideal format is :</p>
<p>| row1 | 123 |</p>
<p>| row2 | 456 |</p>
<p> </p>
<p>Any help is appreciated!</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
mwilliams
<p>If you know the size of the data that will be in the column, you can size the cell for that measure and you'll get the desired result. If you want this done dynamically, you'll likely have to do some scripting. Let me know.</p>
oraBirt
<p>It will be very helpful if you teach me the dynamic way? I really appreciate your great help!</p>
mwilliams
<p>I haven't been able to get the width to take in the onCreate of the crosstab cell. It only seems to work in the beforeFactory. It looks like a manual setting might be your only option. I'll let you know if I find anything else.</p>
oraBirt
<p>Could you please be a little more specific about "manual setting"? Thanks very much!!</p>
mwilliams
<p>If you click into a cell in your crosstab in your design, you can set a width for that cell. If your data is similar length in each column, this would work just fine. Be sure to select the cell, not the data element in the cell.</p>
oraBirt
<p>Yes, it worked!!!</p>
<p>Thanks very much for your great help!!</p>
oraBirt
<p>Sorry that I have two more questions:</p>
<p>1. I followed the example from this link: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/17993-crosstab-alternate-rows-coloring/'>http://developer.actuate.com/community/forum/index.php?/topic/17993-crosstab-alternate-rows-coloring/</a>
. one attachment is my code (how to paste here? thanks a lot!!). another attachment is the sample data,</p>
<p> From the design, there are year, month, priority above the data . But my result is the column color alternate, not rows.</p>
<p>2. We always have 6 months data from today, is there a way to sort the data by this month to the furthest month? say, this is Oct, then the idea result is Oct, Aug, Jul, ect. If this is Feb, then the ideal result is Feb, jan, Dec, Nov, Oct, Aug.BTW, we don't have to have year.</p>
<p>Thanks very much for any help!!</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
mwilliams
<p>Just getting to this. I'll make you an example in the morning.
</p>
mwilliams
<p>Take a look at this report. There is a sort on the month group of the crosstab. You can find this by selecting the crosstab and going to the sorting tab in the property editor.</p>
<p> </p>
<p>The code for the alternating highlight is in the initialize and in the crosstab's onCreate.</p>
<p> </p>
<p>Hope this helps.</p>
oraBirt
<p>Thanks so much for your great help, it works!!</p>
<p> </p>
<p>However, I got new requirements and have more question here, sorry about it.</p>
<p>1. Month and year in two cells need to be replaced as month-year in one cell, java script can solve the problem to display it, but desending order month-year does not work any more.</p>
<p>2. since we don't need to display year , and its visibility is set to invisible, but there is still an extra little box shown above month-year.</p>
<p>3. for the page break, I set to 3 months interval, but somehow it shows more than 3 months data in one page in some pages. the row lines go beyond 3 months grid too.</p>
<p>4. on the page bottom, the total page number does not fully show up.</p>
<p> thanks very much!!</p>
mwilliams
<p>Could you create a sample design that shows these new issues that I can run? That way I can see what all you're doing in the design. Thanks.</p>
oraBirt
<p>Thanks so much for your time and kindness!</p>
<p>Actually, I am not able to repeat the problems after a lot of column adjustments and saves, the good news is somehow the grid looks good, and no more format problems for this report.</p>
<p>Your great help and kindness is really appreciated!</p>
mwilliams
<p>Great! Glad everything is working out! Let me know if you run into any other issues.</p>