This following customization will change the look of your web application that generated by PHP Report Maker become fixed-width layout. Just like PHPMaker, web applications that generated by PHP Report Maker have the layout which have a hundred percent approach of your screen width. If you want to change it become the fixed-width site, then this customization is definitely for you.
The main reason why I prefer the fixed-width site rather than the hundred percent width of screen is since I don't want to make the web application which has the header width is smaller than the maximum width of the report itself, especially when you resize the browser’s window become smaller than the report width. There will be a horizontal scroll shown up after you resize your browser window, and when you are scrolling it to the right, then you will see the header width become smaller than the report width. I think this is not a good condition for web application.
[hidepost]
-
Open your \Script\rpt-config.php file, and find this code:
// General
before that line, please insert the following code:
// Begin of modification Fixed Width Site, by Masino Sinaga, December 2, 2012 define("MSR_SCROLL_TABLE_WIDTH", 1100, TRUE); // The width size of the scroll table define("MSR_VERTICAL_MENU_WIDTH", 150, TRUE); // Vertical menu width define("MSR_TOTAL_WIDTH", MSR_SCROLL_TABLE_WIDTH + MSR_VERTICAL_MENU_WIDTH + 20, TRUE); // End of modification Fixed Width Site, by Masino Sinaga, December 2, 2012
-
Open your \Script\rpt-template.php file, and find this code:
</head>
before that line, please insert the following code:
<?php // Begin of modification Fixed Width Site, by Masino Sinaga, December 2, 2012 ?> <?php if (@$_GET["export"] == "") { ?> <?php $bordercolor = ""; ?> <style> html { height: auto; border-left: 1px solid <?php echo $bordercolor; ?>; border-right: 1px solid <?php echo $bordercolor; ?>; border-top: 1px solid <?php echo $bordercolor; ?>; border-bottom: 1px solid <?php echo $bordercolor; ?>; width: <?php echo (MSR_TOTAL_WIDTH); ?>px; display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; } body { background-color: inherit; /* background color */ color: inherit; /* text color */ margin: 0; /* top right bottom left */ width: <?php echo (MSR_TOTAL_WIDTH); ?>px; height: auto; display: block; } /* template layout */ .ewLayout { width: <?php echo (MSR_TOTAL_WIDTH); ?>px; height: 100%; } .ewContentTable { width: <?php echo (MSR_TOTAL_WIDTH); ?>px; height: 100%; clear: left; } .ewMenuColumn { width: <?php echo MSR_VERTICAL_MENU_WIDTH; ?>px; } </style> <?php } ?> <?php // End of modification Fixed Width Site, by Masino Sinaga, December 2, 2012 ?>
- Finally, re-generate your script files using PHP Report Maker as always.
[/hidepost]
[…] Making a Fixed Width Site Using PHP Report Maker 6.0.0. […]