Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » String based parameters in ODA OCL
String based parameters in ODA OCL [message #776829] Mon, 09 January 2012 10:30
Nigel Daniels is currently offline Nigel DanielsFriend
Messages: 66
Registered: July 2009
Member
Hi,

I have been looking at using sub-reports in a report based on and EMF
model. I found that the following dataset query:

self.objectives->select(id='O1').issues

returns all of the issues contained by the objectives. So I would now
like to replace the 'O1' (a string) with a parameter. To do this I edit
the first Parameter to be the following:

Name: ObjectiveId
Native Name : @target (this seems to be the default)
Data Type: String
Direction: Input
Default Value: 'O1' (type Constant)
Linked to Report Parameter : None

I also change my query to be:

self.objectives->select(id='?').issues

Here is where the problems start for me :( When I now run my query it
does not return anything.

I also note that the name I changed in the parameter fails to 'stick'
and it reverts to @target?

I tried changing the Default Value to be O1 without quotes and I get an
exception:

org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot
execute the statement.
org.eclipse.datatools.connectivity.oda.OdaException: @target:
Unrecognized variable: (O1)
at
org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:52)
....


BTW The reason I edit the @target in the first place is due to the
problem I face if I add a parameter. When I do this I get a parameter
where I cannot set the Native Name, this appears empty. When I run the
query I get the exception:

org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot
execute the statement.
org.eclipse.datatools.connectivity.oda.OdaException: Extra argument
expression (ObjectiveId)
at
org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:52)
....

Any help with what is causing these problems is very welcome.

Best regards,

Nigel.
Previous Topic:slight lag when running first report
Next Topic: new version does not support older version
Goto Forum:
  


Current Time: Thu Nov 27 03:21:44 GMT 2014

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

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