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)
Programmatically Retrieve Dataset Mapping with Java API
andy.rush
<p>I'm working on a project to develop a report wrapper that leverages BIRT's Java API as the underlying generation tool. The underlying queries in the report sometimes result in datasets holding data that is not always displayed in the same manner (or at all) when output. For example, i might get a row that looks like:</p>
<p> </p>
<p>"2014-01-01";"2014-01-14";"653443118056";"1";"$3 CROSSWORD TICKET";189;538.650;567.00;0.0500<br><br>
While the display output of the row is:<br><br>
$3 CROSSWORD TICKET 653443118056-1 198 $564.30 $594.00 $29.70 5.00%</p>
<p> </p>
<p>In the generated output, no dates are displayed in the row and two result set columns are concatenated into a single display column. <br><br>
One of the project specs is the ability to export to CSV with accurate header information. Unfortunately, the display headers are complex with nested rows and columns (and there may be more headers than columns), so the headers generated by the emitter do not properly align with the data fields.<br><br>
I have managed to retrieve the database column names by obtaining a CachedMetaDataHandle and iterating the columns, but this seems to only contain the database columns name. What (i think) i need is to programmatically retrieve the metadata used to bind the result set to the display table prior to output. When i try Google, i find lots of information about obtainingg the mapping data using the JavaScript API, but not so much about using the Java API. Can it be done using just the Java API? If so, how? If not, is there some kind of workaround other than creating the mappings for each report manually?<br><br>
</p>
Find more posts tagged with
Comments
mwilliams
<p>Any way you can provide a small sample input and output, including the complex headers so I can do some sort of testing?</p>
andy.rush
<p>Sure thing. What do you need for input? Just the .rptdesign file? And, other than some output with the nested headers, is there anything else you'd want to see?</p>
mwilliams
<p>A small input data file with a report design how you currently have it set up and a file that shows exactly what you want to see as the output from this simple input file of data would be great at helping me see exactly what you have and what you're wanting.
</p>
andy.rush
<p>Thanks Michael. I sent the requested info to the gmail address shown in your signature.</p>
mwilliams
<p>Great! I'll take a look.
</p>
mwilliams
<p>Messaged you back in your email, yesterday, btw.</p>