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)
how to change the styles of a report, when I going to see it.
caribe
hello
I want to know how can I select between different styles, just when I going to see it, maybe whit a parameter or something like this.
how can I do that?
do you know what I mind?
Find more posts tagged with
Comments
mwilliams
Take a look at this devShare example. It shows how to use a parameter to switch style sheets for a report.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1454-simple-birt-css-style-sheet-example/
caribe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97582" data-time="1331600513" data-date="12 March 2012 - 06:01 PM"><p>
Take a look at this devShare example. It shows how to use a parameter to switch style sheets for a report.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1454-simple-birt-css-style-sheet-example/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1454-simple-birt-css-style-sheet-example/</a><br
/></p></blockquote>
<br />
<br />
hello<br />
<br />
I have a error here, I copied and pasted this method, and created the parameter estilo, what other thing I have to do?<br />
<br />
<method name="initialize"><![CDATA[dh = reportContext.getDesignHandle();<br />
cssh = dh.openCssStyleSheet(params["estilo(<span style='color: #FF8C00'>this is my declared parameter</span>)"].value);<br />
dh.addCss(cssh);]]></method>
mwilliams
Is the value of your parameter the style sheet's name? What is the error you're getting?
caribe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97582" data-time="1331600513" data-date="12 March 2012 - 06:01 PM"><p>
Take a look at this devShare example. It shows how to use a parameter to switch style sheets for a report.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1454-simple-birt-css-style-sheet-example/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1454-simple-birt-css-style-sheet-example/</a><br
/></p></blockquote>
<br />
mm excuse me.. mr wiliams I found my error, was writing, <br />
<br />
but now I have other question, do you have an example or do you know how can I enter the parameter whit a letter and not like and not as a list box?<br />
<br />
what I should do?
mwilliams
If you want to use a text box, instead, you'd just change the parameter type to a text box, then make sure you type in the css file name correctly. Is this what you're asking?
caribe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97614" data-time="1331658055" data-date="13 March 2012 - 10:00 AM"><p>
If you want to use a text box, instead, you'd just change the parameter type to a text box, then make sure you type in the css file name correctly. Is this what you're asking?<br /></p></blockquote>
<br />
yes, mr Williams thank you so so much.. you saving me again.
caribe
other thing <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#>/tongue.gif<br
/>
<br />
do you know if I can insert a image through a file CSS, and how can I do it?
mwilliams
I believe that BIRT supports the CSS property "background-image". You make the value the uri to the image.
caribe
do you thing that I can put a image into a cell, maybe into a cell of a grid?
caribe
following your advice, I did this in the file css
(file CSS)
.image {
background-image : url ('/imagen.jpg');
}
I put a image into a grid without link, and I want to call the image from the file CSS
But don`t work can you guide me?
mwilliams
Just a single particular cell? If so, if the image is in your resource folder, you can do something like:
.customStyle {
background-image : url('images.jpg');
}
If it's available somewhere else by a URL, you can do:
.customStyle2 {
background-image : url('
http://www.gamerdna.com/uimage/Ld7rt0T/full/green-abstract-background-jpg.jpg')
;
}
Then, import your CSS file and select the cell in your grid and apply the custom style in the property editor. The above works from the designer. I'm not sure if the first option will work exactly the same deployed, or not. You'd have to test that one.
mwilliams
Oops, I still had the thread opened from before you responded, so I didn't see your last post. Hopefully this still helps you.
caribe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97761" data-time="1331753057" data-date="14 March 2012 - 12:24 PM"><p>
Just a single particular cell? If so, if the image is in your resource folder, you can do something like:<br />
<br />
.customStyle {<br />
background-image : url('images.jpg');<br />
}<br />
<br />
If it's available somewhere else by a URL, you can do:<br />
<br />
.customStyle2 {<br />
background-image : url('<a class='bbc_url' href='
http://www.gamerdna.com/uimage/Ld7rt0T/full/green-abstract-background-jpg.jpg'>http://www.gamerdna.com/uimage/Ld7rt0T/full/green-abstract-background-jpg.jpg</a>');<br
/>
}<br />
<br />
Then, import your CSS file and select the cell in your grid and apply the custom style in the property editor. The above works from the designer. I'm not sure if the first option will work exactly the same deployed, or not. You'd have to test that one.<br /></p></blockquote>
<br />
<br />
I don't think this work for me, because I can`t import any CSS file because I going to call the CSS file as parameter, as you suggested<br />
<br />
mwilliams<br />
"If you want to use a text box, instead, you'd just change the parameter type to a text box, then make sure you type in the css file name correctly. Is this what you're asking?"<br />
<br />
I need a image in the header of the report, but each file CSS call one particular image.<br />
<br />
<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
help!
mwilliams
If this is only in a single report, you could just set the background image of the cell in script based on which CSS file is called. However, if the customStyle for the cell has the same name in all CSS files, doing it the way I described above shouldn't be an issue, I wouldn't think. You could probably just modify the script from the report I linked you to to drop the CSS file that is currently attached to the report and then add the new one.