Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Printing with gridComponents specifying custom component and summary row

    Hello Isomorphic,

    We are on SmartClient Version: v8.3p_2013-05-22/Pro Deployment. We are noticing that the print preview shows the default layout of grid components in a TreeGrid and ignores what is specified in gridComponents property. Below is a modification of the 'Grid Summaries' sample demonstrating what we are seeing. I have specified gridComponents:["header", customComp, "summaryRow", "body"] on the list grid. It looks fine on the app side but not in the print preview with the issues below. Any ideas?

    (1) The summary row is printed at the bottom instead of on top.
    (2) The component, customComp, added in the tree is not printed.

    Code:
    isc.HTMLPane.create({
    	ID: "customComp",
    	width: "100%",
    	height: 25,
    	showEdges: true,
    	edgeSize: 1,
    	contents: "<div>Custom Content</div>"
    });
    
    isc.ListGrid.create({
        ID: "companyList",
        width:"100%", height:"100%",
        alternateRecordStyles:true,
        autoFetchData:true,
        dataSource:orderItemLocalDS,
        showAllRecords:true,
        canEdit:true, editEvent:"click",
        showGridSummary:true,
        fields:[
            {name:"orderID", includeInRecordSummary:false, summaryFunction:"count"},
            {name:"itemDescription"},
            {name:"category", showGridSummary:true, 
                getGridSummary:function (records, summaryField) {
                    var seenCategories = {};
                    for (var i = 0; i < records.length; i++) {
                        seenCategories[records[i].category] = true;
                    }
                    var totalCategories = isc.getKeys(seenCategories).length;
                    return totalCategories + " Categories";
                    
                }
            },
            {name:"shipDate", showGridSummary:false, summaryFunction:"max"},
            
            {name:"quantity", showGridSummary:false},
            {name:"unitPrice", showGridSummary:false,
             formatCellValue:function (value) {
                 if (isc.isA.Number(value)) {
                    return value.toCurrencyString("$");
                 }
                 return value;
             }
            },
            {name:"Total", type:"summary", recordSummaryFunction:"multiplier",
             summaryFunction:"sum",
             showGridSummary:true,
             align:"right",
             formatCellValue:function (value) {
                 if (isc.isA.Number(value)) {
                    return value.toCurrencyString("$");
                 }
                 return value;
             }
            }
        ],
        gridComponents:["header", customComp, "summaryRow", "body"]
    });
    
    isc.Button.create({
    	ID: "printButton",
    	title: "Print Preview",
        click:function () {
            companyList.showPrintPreview()
        }
    });
    
    isc.VLayout.create({
    	width:600, height:520,
    	members: [ printButton, companyList ]
    });

    #2
    We've reworked how the printHTML is generated to solve this issue.
    Please try the next nightly build (dated July 18 or above) in the 8.3p, 9.0p or 9.1d branches

    Regards
    Isomorphic Software

    Comment


      #3
      Awesome, thank you Isomorphic for such a quick fix! I confirmed the fix and will upgrade to the latest 8.3 build.

      Comment

      Working...
      X