Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Get rowmapping from DataSetHandle?
Get rowmapping from DataSetHandle? [message #512237] Thu, 04 February 2010 13:20 Go to next message
bob is currently offline bobFriend
Messages: 60
Registered: July 2009
Member
I iterate a list of dataSetHandles (bound to a XML data source) extracted
from a .rptdesign file:

List<DataSetHandle> dataSetsHandles = report.getAllDataSets();
for (DataSetHandle dsh : dataSetsHandles) {
String dsName = dsh.getName();
String rowMapping = dsh.....??

}

I would like to extract the rowmapping from a DataSetHandle which could be
something like this:

/root/books/author

But I can only seem to get the full queryText like:

String rowMapping = dsh.getProperty("queryText");

But then I also get all the column mappings. Is there any way to ONLY get
the XPath rowmapping?
Re: Get rowmapping from DataSetHandle? [message #512326 is a reply to message #512237] Thu, 04 February 2010 16:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Bob,

Can you not just do a split on the query text
" table0#-TNAME-#table0#:#[/people/person/name]#:#{name;String ;} "

Split on the #.

Jason

bob wrote:
> I iterate a list of dataSetHandles (bound to a XML data source)
> extracted from a .rptdesign file:
>
> List<DataSetHandle> dataSetsHandles = report.getAllDataSets();
> for (DataSetHandle dsh : dataSetsHandles) {
> String dsName = dsh.getName();
> String rowMapping = dsh.....??
>
> }
>
> I would like to extract the rowmapping from a DataSetHandle which could
> be something like this:
>
> /root/books/author
>
> But I can only seem to get the full queryText like:
>
> String rowMapping = dsh.getProperty("queryText");
>
> But then I also get all the column mappings. Is there any way to ONLY
> get the XPath rowmapping?
Re: Get rowmapping from DataSetHandle? [message #512526 is a reply to message #512326] Fri, 05 February 2010 11:00 Go to previous message
bob is currently offline bobFriend
Messages: 60
Registered: July 2009
Member
"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:hketls$4uo$1@build.eclipse.org...
> Bob,
>
> Can you not just do a split on the query text
> " table0#-TNAME-#table0#:#[/people/person/name]#:#{name;String ;} "
>
> Split on the #.
>
> Jason



Yes thats how I currently do it, but just wanted to know if there were any
alternatives :-)
Previous Topic:javascript functions in Expression Builder
Next Topic:Cannot add data sets (using the birt engine)
Goto Forum:
  


Current Time: Thu Apr 18 03:50:09 GMT 2024

Powered by FUDForum. Page generated in 0.01627 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top