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)
css file in report design
patilyogesh@icloud.com
<p>Hi </p>
<p> </p>
<p>I am trying to load a simple css to a bird report and associate it with a Dynamic HTML text in a simple bit report but i am getting cannot import style in notifications</p>
<p> </p>
<p>I am expecting the page to be rendered as </p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_vertical_fixed'>http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_vertical_fixed</a></p>
;
<p> </p>
<p>Do you see any issues </p>
Find more posts tagged with
Comments
Clement Wong
<p>According to <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3/help/adg/adg27/index.html#page/ADG/fm-HowToLinkACSSFile.html'>http://developer.actuate.com/be/documentation/ihub3/help/adg/adg27/index.html#page/ADG/fm-HowToLinkACSSFile.html</a></p>
;
<p> </p>
<p style="margin-left:40px;"><em>BIRT Report Designer supports the CSS2 specification. Not all CSS2 properties, however, are supported. For a list of unsupported properties, see the Style and CSS specification document, which is available at the following URL:</em></p>
<div style="margin-left:40px;"><em><a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/ref'>http://www.eclipse.org/birt/phoenix/ref</a></em><br>
;
</div>
<div style="margin-left:40px;"><em>Styles that use unsupported properties are available to a report. The unsupported properties, however, do not have an effect when applied to a report element.</em></div>
<div> </div>
<div> </div>
<div>If you want to use the full CSS, you can use head.js, which is available as of BIRT 4.3 (<a data-ipb='nomediaparse' href='
https://eclipse.org/birt/phoenix/project/notable4.3.php#jump_6'>https://eclipse.org/birt/phoenix/project/notable4.3.php#jump_6</a>)
, to include your custom CSS styles.</div>
<div> </div>
<div>The attached example illustrates this technique using your example. You will need to place the sample.css in your birt viewer root directory. For me, it's located in C:\BIRT4.5.0\eclipse\plugins\org.eclipse.birt.report.viewer_4.5.0.v201506092134\birt.</div>
<div> </div>
<div>The <em>clientScripts > clientInitialize</em> event has the code:</div>
<div style="margin-left:40px;"><span style="font-family:'courier new', courier, monospace;">head.js ("/viewer/sample.css");</span></div>
<div> </div>
<div>And I did modify the HTML slightly and added <span style="font-family:'courier new', courier, monospace;">position:absolute;</span> in the <span style="font-family:'courier new', courier, monospace;"><div></span>:</div>
<div style="margin-left:40px;"><span style="font-family:'courier new', courier, monospace;"><div style="<span style="color:#b22222;"><strong>position:absolute;</strong></span>margin-left:25%;padding:1px 16px;height:1000px;"></span></div>
<div> </div>
<div>
patilyogesh@icloud.com
<blockquote class="ipsBlockquote" data-author="patilyogesh@icloud.com" data-cid="141333" data-time="1452138784">
<div>
<p>HI Clement</p>
<p> </p>
<p>Thanks for the response but how do i find my bird viewer root directory.I have a webroot and WEB-INF folder in my directory for eclipse.</p>
</div>
</blockquote>
<p> </p>
<br><p>HI Clement</p>
<p> </p>
<p>Thanks for the response but how do i find my bird viewer root directory.I have a webroot and WEB-INF folder in my directory for eclipse.Attaching the screen shot.</p>
<p> </p>
<p>Or do i have to define viewer root directory</p>
Clement Wong
<p>Since your webroot contains sample.css, the you should be able to use <span style="font-family:'courier new', courier, monospace;">head.js ("/sample.css");</span></p>
patilyogesh@icloud.com
<p>I tried the option but its not working i am using my Eclipse CI 2015 for mac.</p>
<p>Also attaching web.xml</p>
Clement Wong
<p>First step, in the Designer...</p>
<p>Did you first try run/viewing the report in the Designer first?</p>
<p> </p>
<p>Did you also try to put the sample.css in the plugins?</p>
<p> </p>
<p> </p>
<p>Second step, for your deployment environment...</p>
<p> </p>
<p>How are you accessing your report?</p>
<p> </p>
<p>To understand your framework/environment, what URL would you use to access index.jsp?</p>
<p> </p>
<p>If you use Chrome, use the DevTools, look at the Network tab, and attempt to run/view your report, what do you see?</p>
<p> - Do you see a 404 error for the sample.css?</p>
<p> - What is the URL for blank.html?</p>
<p> - What is the URL for Close.gif?</p>
<p> - What is the URL for Loading.gif?</p>
patilyogesh@icloud.com
<p>Thanks Clement</p>
<p> </p>
<p>I finally resolved the issue.Using Developer Tools was the key.I was able to see what was carried forward in the deployment.I was getting 404 error because the CSS was not in the deployment finally i got the right path </p>
<p> </p>
<p>it was <span style="font-family:Monaco;font-size:11px;color:rgb(0,0,0);">head.js</span><span style="font-family:Monaco;font-size:11px;color:rgb(148,55,255);"> </span><span style="font-family:Monaco;font-size:11px;color:rgb(0,0,0);">(</span><span style="color:rgb(57,51,255);font-family:Monaco;font-size:11px;">"/testcss/report-viewer/birt/styles/sample.css"</span><span style="font-family:Monaco;font-size:11px;color:rgb(0,0,0);">);</span></p>
<p> </p>
<p><span style="font-family:Monaco;font-size:11px;color:rgb(0,0,0);">i.e /projectname/</span><span style="color:rgb(57,51,255);font-family:Monaco;font-size:11px;">report-viewer/birt/styles/sample.css.</span></p>
<p> </p>
<p><span style="color:rgb(57,51,255);font-family:Monaco;font-size:11px;">Thank you so much for your help.Now i have to write some java scripts and continue from here.</span></p>
Clement Wong
<p>Great that you were able to track the reference down. There are some cool tricks and detailed debugging that you can do with Chrome DevTools.</p>