Announcement

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

    showPrintPreview properties with parameters in IE11

    Hi Isomorphic,

    using this showcase sample from here:

    https://www.smartclient.com/smartcli.../?id=pdfExport

    with this code:

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width: 500, height: 350, 
        data: countryData,
        fields: [
            {name: "countryName", title: "Country"},
            {name: "capital", title: "Capital"},
            {name: "continent", title: "Continent"}
        ],
        canExpandRecords: true,
        expansionMode: "detailField",
        detailField: "background"
    });
    
    isc.IButton.create({ 
        ID : "buttonPdf",
        width: 150,
        title: "Export",  
        click : function () {
            // this sample exports to the Enterprise skin, and that skin defaults to 
            // alternate row styling but not alternate field styling - remember the 
            // alternate styling settings (from the current skin) and update them to
            // those required for Enterprise, via a call to setProperties().
            var oldAlternateRecordStyles = countryList.alternateRecordStyles;
            var oldAlternateFieldStyles = countryList.alternateFieldStyles;
            countryList.setProperties({
                alternateRecordStyles: true,
                alternateFieldStyles: false
            });
    
            var settings = {
                skinName: "Enterprise", 
                pdfName: "export"// without .pdf
            };
            isc.RPCManager.exportContent(mainLayout, settings);
    
            // reinstate the alternate styling settings from the current skin, on a short delay
            countryList.delayCall("setProperties", [{
                alternateRecordStyles: oldAlternateRecordStyles,
                alternateFieldStyles: oldAlternateFieldStyles
            }], 300);
        }
    });
    isc.IButton.create({ 
        ID : "buttonPreview",
        width: 150,
        title: "Show Print Preview",  
        click: function () {
            Canvas.showPrintPreview(mainLayout,null,{title: "München",printButtonTitle :"München"});
            }
    });
    isc.HLayout.create({
        ID: "hLayout",
        membersMargin: 5,
        members: [
            buttonPdf,
            buttonPreview
        ]
    });
    isc.VLayout.create({
        ID: "mainLayout",
        width: 500,
        membersMargin: 5,
        height: 350,
        members: [
            countryList,
            hLayout
        ]
    });
    countryList.expandRecord(countryList.data[2]);
    countryList.expandRecord(countryList.data[4]);
    Using my code please click "Try It" and then "Show Print Preview". The Print Preview Window doesn't show up in
    • Internet Explorer 11.885.17134.0
    but shows up in those browsers:
    • Chrome Version 76.0.3809.100
    • Firefox Quantum 68.0.1


    I think the problem is something related to showPrintPreview:

    Code:
     
      Canvas.showPrintPreview(mainLayout,null,{title: "München",printButtonTitle :"München"});
    As you can see, I pass parameters for "printWindowProperties" as mentioned in the docs: https://www.smartclient.com/smartcli...owPrintPreview

    From Docs:
    Code:
    [I]void[/I] [B]showPrintPreview[/B] (components[, printProperties, printWindowProperties, callback, separator])
    Please take a look at it.
    Thanks in Advance,
    Kind Regards

Working...
X