|
Re: Disable default styles [message #709138 is a reply to message #708985] |
Wed, 03 August 2011 14:41 |
|
Are you using the API or the Viewer? If you are using the API take a
look at some of the html render options here:
http://www.eclipse.org/birt/phoenix/project/notable3.7.php#jump_8
Jason
On 8/3/2011 7:18 AM, Em wrote:
> Is it possible to disable the default style created by BIRT has well has
> the script tag that is generated when the output format is HTML?
> For example, every time a report is generated the output includes the
> following HTML tags:
>
>
> <style type="text/css">
> .style_0 { font-family: serif; font-style: normal; font-variant: normal;
> font-weight: normal; font-size: 10pt; color: black; text-indent: 0em;
> letter-spacing: normal; word-spacing: normal; text-transform: none;
> white-space: normal; line-height: normal;}
> </style>
> <script type="text/javascript">
> //<![CDATA[
> function redirect(target, url){
> if (target =='_blank'){
> open(url);
> }
> else if (target == '_top'){
> window.top.location.href=url;
> }
> else if (target == '_parent'){
> location.href=url;
> }
> else if (target == '_self'){
> location.href =url;
> }
> else{
> open(url);
> }
> }
> //]]>
> </script>
> <table>
> (...)
> </table>
>
>
> Can this be disabled?
>
|
|
|
|
Re: Disable default styles [message #709199 is a reply to message #709151] |
Wed, 03 August 2011 15:50 |
|
The only way to remove the JavaScript function is to modify the
HTMLEmitter. Comment out fixRedirect( ) function the
HTMLReportEmitter.java class in the start method. I also do not see a
way around the styles unless you modify the emitter. One option you
have is when you create the report and right click on the styles there
is a use css option. You can point to a local style sheet and click the
check box to "Include CSS file at view time(Apply only to HTML format).
This will still produce the styles at the top of the output, but will
change the individual items like the following.
//top of output
<style type="text/css">
..style_2 { font-family: Arial; font-size: small; padding: 0px;
background-color: rgb(186, 202, 226);}
..
..
//a link is automatically placed in the output that points to my
//viewtime css
<link rel="stylesheet" type="text/css"
href="http://localhost:8090/3.7/corporate.css"></link>
//table row with style
<tr class="style_1 HeaderFooter" valign="top" align="center">
The class attribute shows up with two styles. The browser will try to
locate the HeaderFooter style before applying style_1. If it can not
find it the style_1 will be applied.
Jason
On 8/3/2011 11:05 AM, Em wrote:
> I've looked at it but the closest option to what I want is
> options.setEnableInlineStyle(true); but I don't want to set the styles
> inline, I want to completely remove the styles generated by BIRT.
> I'm using the API and the desired output that I have in mind is to be
> able to set something like:
> <div class="my_external_stylesheet_class_name">
> and not
> <div class="style_0">
>
> Can this be archived?
>
> What about the javascript, I don't need it in my page, can't it be
> disabled so that the output comes in clean HTML?
|
|
|
|
Re: Disable default styles [message #709270 is a reply to message #709223] |
Wed, 03 August 2011 18:08 |
|
This may be by design as the link statement is in the header. Can you
open a bugzilla entry for this?
Jason
On 8/3/2011 12:47 PM, Em wrote:
> Thank you for your reply, it answered my question. I have only one doubt
> left regarding this issue. I'm using the "Use CSS File.." options from
> the report designer and I've checked the "Include CSS file at view time"
> check box but when I set the report to be embedded the external CSS
> classes are not outputted to the HTML.
>
> If I configure the options like this:
> HTMLRenderOption options = new HTMLRenderOption();
> options.setOutputFormat(IHTMLRenderOption.OUTPUT_FORMAT_HTML);
> options.setOutputStream(output);
> options.setEmbeddable(false);
> I get this:
>
> But if I set the options to be embeddable like this:
> HTMLRenderOption options = new HTMLRenderOption();
> options.setOutputFormat(IHTMLRenderOption.OUTPUT_FORMAT_HTML);
> options.setOutputStream(output);
> options.setEmbeddable(true);
> I get this:
>
>
> Why aren't the classes present in the embeddable HTML? Is this normal?
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04202 seconds