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)
BIRT ODA designer state
srisaibabu
Hi All,<br />
<br />
I have created BIRT ODA, it is working fine, but I am not able to save UI state. because user can change the query again while previewing results.<br />
<br />
<br />
<em class='bbc'>private void initializeControl( )<br />
{<br />
/* <br />
* To optionally restore the designer state of the previous design session, use<br />
* getInitializationDesignerState(); <br />
*/<br />
}</em><br />
<br />
Above method has a comment, which stats designer state can be restored using getInitializationDesignerState() method, but it always returns null.<br />
<br />
Please let me know, if anyone of you have used this method to restore the UI state.<br />
<br />
Regards,<br />
Sri Sai
Find more posts tagged with
Comments
CBR
Hi Sri,
you can have a look at the project that i shared recently. It is a Excel ODA driver.
I customized the data set dialog as well and had same problems. You can check out the project from google code or browse the code using the google web interface:
http://code.google.com/p/birt-spreadsheet-datasource/source/browse/#svn/trunk/de.c-brell.birt.report.data.oda.spreadsheet.ui/src/de/cbrell/birt/report/data/oda/spreadsheet/ui/dataset
Let me know if you have any questions.
hope this helps
Christian
srisaibabu
Thanks Christian
I will go through your code.
Regards,
Sri Sai
CBR
Did it help or is my code even more confusing?
srisaibabu
Hi Christian,<br />
<br />
To be frank yes <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/confused.gif
<br />
Please correct me if am wrong, one thing i noticed is, we can only restore queryString.<br />
<br />
Could you please help me.<br />
<br />
Regards,<br />
Sri Sai
CBR
Hi,
you can restore everything that is part of your serialized model. When creating a ODA data source you can specify public and private properties. These properties are to be written to the rptdesign xml file. You can restore every single property of your ODA data source in the dialogs.
In my sample i had several properties to be restored (query text was only one of them). If you couldn't restore a certain property it would be very difficult to execute the data source (everything that you can't restore is lost and will not be written to your report design xml file).
If i understand correctly you have problems when the user edits a data set and switches from preview back to query to change the query and reruns preview. What's exactly your problem?
srisaibabu
Hi Christian,<br />
<br />
Yes your correct.<br />
<br />
<em class='bbc'>If i understand correctly you have problems when the user edits a data set and switches from preview back to query to change the query and reruns preview.</em><br />
<br />
As you said above, at this point i need to restore all the UI state.<br />
In my ODA, i didn't use any private or public properties.<br />
<br />
Regards,<br />
Sri Sai
srisaibabu
Hi Christian,
As you said, i was trying to create properties using below code in savePage method,
private void savePage( DataSetDesign dataSetDesign )
{
if ( dataSetDesign.getPublicProperties( ) == null )
{
String dsID = dataSetDesign.getOdaExtensionDataSourceId( );
String dstID = dataSetDesign.getOdaExtensionDataSetId( );
Properties dsProp = DesignSessionUtil.createDataSetPublicProperties(
dsID,dstID,getBlankPageProperties( ) );
dataSetDesign.setPublicProperties( dsProp );
}
System.out.println("dataSetDesign.getPublicProperties()="+dataSetDesign.getPublicProperties());
}
But unfortunately to my surprise, Properties object i.e. dsProp always returns null, even after setting Public properties, above code for reference.
Please let me know your suggestions.
Thank You.
Regards,
Sri Sai
CBR
Are you able to share your code or is this a commercial project?
srisaibabu
Sorry Christian not possible.
Am using the method which i pasted above.
Please let me know, were you referring to the same properties object or some thing else.
--Sri Sai