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)
Set Theme in a library with script
fabriziocrameri
Hello
I have a Masterpage with Header and Footer in a Library.
Now i wont set the theme on the Library with a script in the inizialize.
How can i do that?
Thanks for helping.
Regards
Fabrizio
Find more posts tagged with
Comments
mcremer
<blockquote class='ipsBlockquote' data-author="'fabriziocrameri'" data-cid="82383" data-time="1315398800" data-date="07 September 2011 - 05:33 AM"><p>
Hello<br />
<br />
I have a Masterpage with Header and Footer in a Library.<br />
<br />
Now i wont set the theme on the Library with a script in the inizialize.<br />
<br />
How can i do that?<br />
<br />
Thanks for helping.<br />
<br />
Regards<br />
Fabrizio<br /></p></blockquote>
<br />
You cant put scripts in a library only scripts on objects of the Body. The inizialize part of a report is a script you can trealy put in a library.<br />
<br />
You can however put in several themes and sutch in a library.<br />
<br />
Hope this helps.
fabriziocrameri
I tried this on the inizialize of my design:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().findLibrary("myLib.rptlibrary").setThemeName("myThemeLib.myTheme");</pre>
<br />
And I become the following error:<br />
<br />
Wrapped org.eclipse.birt.report.model.api.IllegalOperationException: The module is read-only and operation is forbidden.<br />
<br />
What?s the Problem, how can I solve it?
mcremer
<blockquote class='ipsBlockquote' data-author="'fabriziocrameri'" data-cid="82440" data-time="1315480048" data-date="08 September 2011 - 04:07 AM"><p>
I tried this on the inizialize of my design:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().findLibrary("myLib.rptlibrary").setThemeName("myThemeLib.myTheme");</pre>
<br />
And I become the following error:<br />
<br />
Wrapped org.eclipse.birt.report.model.api.IllegalOperationException: The module is read-only and operation is forbidden.<br />
<br />
What?s the Problem, how can I solve it?<br /></p></blockquote>
<br />
your settin gthe THEME in the library. Not in the design. You cannot set a library (its a library you can only check out a book as it were).<br />
<br />
What you can do is do it in your initialize and the styles from your library.<br />
<br />
SO you need to do:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
reportContext.getDesignHandle().setThemeName("myThemeLib.myTheme");
</pre>
fabriziocrameri
for the Design I execute<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().setThemeName("myThemeLib.myTheme");</pre>
<br />
But it doesn't work for Elements linked to the library.<br />
<br />
Any Ideas?
XFabien
<blockquote class='ipsBlockquote' data-author="'fabriziocrameri'" data-cid="82445" data-time="1315482384" data-date="08 September 2011 - 04:46 AM"><p>
for the Design I execute<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().setThemeName("myThemeLib.myTheme");</pre>
<br />
But it doesn't work for Elements linked to the library.<br />
<br />
Any Ideas?<br /></p></blockquote>
<br />
That is the question I am looking for too.<br />
Is there anyone can help?<br />
<br />
Thanks in advance!!!
XFabien
I have done a lot of research for this, unluckily, I didn't find the anwser.
Hope Somebody here can tell me the solution.
Thanks
XFabien
Anybody can help me in this?
Thanks.