Hello,
We are having an issue with Content being clipped to 1 page in Firefox when trying to print a ListGrid. I've recreated the problem in the SDK as well. I spent some time researching this and found this blog post which describes the same problem and offers various suggestions on how to fix it. The blog appears to discuss Firefox2 but the symptoms match what we see in Firefox3 as well as Firefox 2: http://jafferhaider.wordpress.com/2007/12/29/fix-for-the-firefoxcss-one-page-printing-bug/
I experimented with the settings suggested on our smartclient page extensively but I think this may be an issue with how SmartClient lays out the page?
Here is how I recreated. Use the following jsp code in the SDK. If you click File > Print Preview in IE7, you'll see multiple pages (although it looks like the grid is only fetching partial data, not sure why this happening) and can print multiple pages including all of those seen on the sceen. However, if you click File > Print Preview in Firefox 3, it will only show you 1 page and that 1 page is cut off and not showing all the data you see on the screen.
Just for comparison sake, I tried the same Print Preview action with a plain old html table and both browsers can print it fine with multiple pages:
We are having an issue with Content being clipped to 1 page in Firefox when trying to print a ListGrid. I've recreated the problem in the SDK as well. I spent some time researching this and found this blog post which describes the same problem and offers various suggestions on how to fix it. The blog appears to discuss Firefox2 but the symptoms match what we see in Firefox3 as well as Firefox 2: http://jafferhaider.wordpress.com/2007/12/29/fix-for-the-firefoxcss-one-page-printing-bug/
I experimented with the settings suggested on our smartclient page extensively but I think this may be an issue with how SmartClient lays out the page?
Here is how I recreated. Use the following jsp code in the SDK. If you click File > Print Preview in IE7, you'll see multiple pages (although it looks like the grid is only fetching partial data, not sure why this happening) and can print multiple pages including all of those seen on the sceen. However, if you click File > Print Preview in Firefox 3, it will only show you 1 page and that 1 page is cut off and not showing all the data you see on the screen.
Code:
<!-------------------------------------------------------------------- SmartClient SDK Component Data Binding example Copyright 2001-2007 Isomorphic Software, Inc. (www.isomorphic.com) ----------------------------------------------------------------------> <%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %> <HEAD><TITLE> SmartClient SDK - Supply Example </TITLE></HEAD><isomorphic:loadISC skin="SmartClient"/> <BODY BGCOLOR=#D3D3D3> <SCRIPT> <isomorphic:loadDS name="supplyItem"/> <isomorphic:loadDS name="supplyCategory"/> isc.setAutoDraw(false); // so no fields, and no DS leads to error, but it's a different one // no fields, but a DS doesn't lead to error (thought I thought it would) // No DS, but fields... isc.ListGrid.create({ ID:"supplyGrid", dataSource:"supplyItem", useAllDataSourceFields:true, fields:[ {name:"itemName", title:"Name", showHover:true}, {name:"unitCost", formatCellValue:"return isc.Format.toCurrencyString(parseFloat(value))", editorType:"spinner", editorProperties:{step:0.01}}, {name:"SKU", canEdit:false}, {name:"description", showHover:true}, {name:"category", canEdit:false}, {name:"inStock", width:55, align:"center", formatCellValue : function (value, record, field, rowNum, colNum) { if (value) return isc.Canvas.imgHTML("demoApp/checked.png",13,13); else return isc.Canvas.imgHTML("demoApp/unchecked.png",13,13) }}, {name:"nextShipment", showIf:"false"} ], canEdit:true, modalEditing:true, cellChanged:"this.updateDetails()", alternateRecordStyles:true, canDragRecordsOut:true, useCellEvents:true, hoverWidth:200, hoverHeight:20, selectionType:"single", // Function to update details based on selection updateDetails : function () { var record = this.getSelectedRecord(); if (record == null) return itemDetailTabs.clearDetails(); if (itemDetailTabs.getSelectedTabNumber() == 0) { // View tab: show selected record itemViewer.setData(record) } else { // Edit tab: edit selected record itemDetailTabs.updateTab("editTab", editForm); editForm.editRecord(record); } } }); <%-- **************overall page layout ************************--%> isc.VLayout.create({ ID:"pageLayout", width:"100%", height:"100%", members:[ isc.HLayout.create({ ID:"mainLayout", layoutMargin:5, members:[ supplyGrid ] }) ] }); function initPageLayout(){ pageLayout.draw(); supplyGrid.setOverflow("visible"); supplyGrid.body.setOverflow("visible"); } supplyGrid.fetchData({units:"Box"},"initPageLayout();"); </SCRIPT> </BODY></HTML>
Just for comparison sake, I tried the same Print Preview action with a plain old html table and both browsers can print it fine with multiple pages:
Code:
<HEAD><TITLE> PLAIN OLD TABLE </TITLE></HEAD> <BODY BGCOLOR=#D3D3D3> <table> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> <tr><td>test</td></tr> </table> </BODY></HTML>
Comment