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)
How would I turn a cross tab column header sideways?
mkdz
<p>Is there any way to get the crosstab column headers to go up vertically? If so, how? Thanks!</p>
Find more posts tagged with
Comments
Yaytay
<p>There are a couple of options:</p><ul class='bbc'><li>There is a BIRT plugin for rotated text.<br />
<a data-ipb='nomediaparse' href='
http://code.google.com/a/eclipselabs.org/p/birt-controls-lib/'>http://code.google.com/a/eclipselabs.org/p/birt-controls-lib/</a><br
/>
This works for printed output, but it operates by rendering the text to an image, so it's not perfect for spreadsheet output.</li><li>The SpudSoft Excel emitters (in version 4.3 or on BitBucket for versions after 2.5.2) have an option for rotating text that works with Excel output - I don't whether other emitters (for Excel or other formats) have similar functionality.<br />
<a data-ipb='nomediaparse' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/downloads'>https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/downloads</a></li></ul><p>If
you are outputting to Excel the SpudSoft approach is much better than the BIRT rotated text plugin, but if you are outputting to PDF the plugin approach is fine.</p><p> </p><p>Jim</p>
mkdz
<p>Well, I'm looking to output to web, PDF, and Excel.</p>
Yaytay
<p>For the best output then I'd try to have both approaches used - which you can do by adding two items to the report and setting them to only display on the appropriate output formats.</p>
mkdz
<p>So I got the BIRT plugin for rotated text working. The text shows up as rotated in an image on the PDF output. However, the resolution is a little lacking. It looks like it is being output as a PNG. Is there a way to up the resolution or change the plugin so it's outputted as a SVG? Thanks!</p>
Yaytay
<p>I'm not sure, but I think either of these two will work:</p><ul class='bbc'><li>Set EngineConstants.APPCONTEXT_CHART_RESOLUTION in the AppContext.<br />
I set this to 300 by default in my report server.</li><li>Set IRenderOption.CHART_DPI in the RenderOption.</li></ul><p>I don't use that plugin, but I've just had a rummage through the source and I think they'll do it.</p><p> </p><p>Jim</p>
mkdz
<p>So I would have to set these in my Java code I'm using to generate the report?</p>
Yaytay
<p>If you want consistent results across all of your reports, then yes, but I think it will work if you just set the values in the beforeFactory script of the report too.</p><p>The only issue with that is that you'll need to know the values for the constants:</p><ul class='bbc'><li>public final static String APPCONTEXT_CHART_RESOLUTION = "CHART_RESOLUTION";</li><li>public static final String CHART_DPI = "ChartDpi";</li></ul><p>Jim</p>
mkdz
<p>Isn't the script part of the report JS and not Java?</p>
Yaytay
<p>Yes (well, you could make Java if you wanted to, but it's not worth it for this).</p><p>All I'm saying is that you can use a JS beforeFactory script to set up the values which will give you a very quick way to check whether they work or not.</p>
mkdz
<p>Oh, I get it now. You're saying to turn this Java code:</p><ul class='bbc'><li>public final static String APPCONTEXT_CHART_RESOLUTION = "CHART_RESOLUTION";</li></ul><p style="margin:0px;">into JS to use in the Script section of the report</p>
Yaytay
<p>Not quite.</p><p> </p><p>The beforeFactory script would have to be:</p><pre class="_prettyXprint"> reportContext.getAppContext().put("CHART_RESOLUTION",300);</pre><p>Except it might not get away with being that simple because the appContext might be null - but for a first test try that as it is.</p>