What is the best way to do this?
Change the background color of the report that appears in my webpage
(6 posts) (2 voices)-
-
If depends a bit how the report is embedded and what kind of data is shown (is it a whole report or just part of the report, image vs table etc).
Visual elements are defined by CSS. Start by setting background color to the report's body if you are embedding a complete report:
select 'dbr.css', 'body {background: #EAEAEA}';
--
myDBR Team -
I am loading the report with this:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){$('#side-menu ul li a').click(function(){
$('#report_window').load('reportlist.html #' + $(this).attr('href'));
return false;
});});
</script>The reportlist.html looks like this:
<div id="teacher-list" >
<object data="http://localhost/mydbr/report.php?r=29&m=1&h=8edf7d3a7c83eb1113a23b5e5c81067aec0c14ad&i=1&hdr=0'"
type="text/html" height="500px" width="100%" > </object>
</div><div id="school-list">
<object data="http://localhost/mydbr/report.php?r=30&m=1&h=64805d8fae6418518bc1d48f4aeb9393f3b4bf0d&i=1&hdr=0'"
type="text/html" height="500px" width="100%" > </object></div>
My menu looks like this:
<li> <a href="#">Teacher </a> <ul> <li> <a href="student-list">Student List </a> </li></ul> </li>I dont want to put css in each of my reports. Is there another way to do it?
-
You can define gloabl css definitions in mydbr/user/userstyle.css available from Admin Tools -> Server side files -> userstyle.css.
--
myDBR Team -
OK. So exactly how does the CSS look that would change the background of the report object?
-
You can use:
body {background: #EAEAEA}
Where the #EAEAEA is the desired color code.
--
myDBR Team
Reply
You must log in to post.