Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
setting property bindings with de api
mbodiford
Hi,
I have a report library in which I'm getting my tables, data sets, etc. from in order to create the report design. Everything in my report library is able to be retrieved and added to the design except for my property bindings for my dataset. The sql for the dataset is extremely dynamic so I modifiy the query in the property bindings section adding additional where clauses, etc.
I can retrieve the property bindings from the library; I can view the text through debugging the creation of the design file and it is correct. However, when I add the binding to the data set and open the rptdesign file, it is never there. The binding for the dataset is completely empty. I'm sure I'm doing something wrong here, but I cannot seem to find an example in which this gets added through java code.
Here is the code I'm using (I've tried all commented out ways; I'm sure one works but alas, cannot seem to find the correct variation lol):
//find the correct data set based on dateSetName
for (Iterator i = design.getDataSets().iterator(); i.hasNext(); ){
DataSetHandle dataSetHandle = (DataSetHandle) i.next();
for(Iterator j = dataSetHandle.getPropertyBindings().iterator(); j.hasNext();) {
PropertyBinding prop = (PropertyBinding)j.next();
Expression ex = (Expression)prop.getExpressionProperty("value");
//designHandle.getPropertyBindings().add(prop);
//designHandle.setPropertyBinding(prop.getName(), ex);
//designHandle.setPropertyBinding(prop.getName(), prop.getValue());
//dataSetHandle.setPropertyBinding("queryText", ex);
//dataSetHandle.setProperty("queryText", prop.getValue());
//dataSetHandle.setExpressionProperty("queryText", ex);
dataSetHandle.getPropertyBindings().add(ex);
}
//add dataSet to the report
designHandle.getDataSets().add(dataSetHandle);
}
Any ideas would be much appreciated.
Thanks!!
Magan
Find more posts tagged with
Comments
There are no comments yet