scottevansdavis44

PrintTask Error with FeatureLayer selection

Discussion created by scottevansdavis44 on Sep 10, 2012
Latest reply on Jul 25, 2016 by krefftc
Using ArcServer 10.1 and JSAPI 3.1. Printtask works when selection of a featurelayer under a feature service is empty. After a selection is made the follow error occurs:

Layer "graphicsLayer0": Failed to create layer from service at http://darkside:6080/arcgis/rest/services/TheAddresser/YorkCounty_SDE/FeatureServer/0. Failed to execute (ExportWebMap). Failed to execute (Export Web Map).

This feature service is secured. Anyone have any ideas? Sample code below.

        var printTask = new esri.tasks.PrintTask(url);
        var templateP = new esri.tasks.PrintTemplate();
        templateP.format = "PDF";
        templateP.layout = "85x11";
        templateP.preserveScale = true;
        template.layoutOptions = { titleText: '', authorText: "ME", scalebarUnit: 'Feet', legendLayers: [] };
        var params = new esri.tasks.PrintParameters();
        params.outSpatialReference = map.spatialReference;
        params.map = map;
        params.template = templateP;
        printTask.execute(params, function (result) {
            window.open(result.url);
            hideWorking();
        }, function (err) {
            errorWin(err, 'printMap');
        });

Outcomes