bhavya.k Posted December 4, 2020 Share Posted December 4, 2020 Version: 7.5.0While passing a parameter to drill-down report from the main report I am getting the from date and the to date in the below formatFrom_Date: Array [ "rO0ABXNyAA1qYXZhLnNxbC5EYXRlFPpGaD81ZpcCAAB4cgAOamF2YS51dGlsLkRhdGVoaoEBS1l0nGQMAAHhwdwgAAAF1j194QHg=" ]To_Date: Array [ "rO0ABXNyAA1qYXZhLnNxbC5EYXRlFPpGaD81ZpcCAAB4cgAOamF2YS51dGlsLkRhdGVoaoEBS1l0nGQMAAHhwdwgAAAF2Kd5AQHg=" ][/code]How to decode or convert the above format to Date?when passed the above parameter to the drill-down report getting the below error { "value": "failed", "errorDescriptor": { "message": "Input controls validation failure", "errorCode": "input.controls.validation.error", "parameters": ["ValidationErrorImpl{errorCode='fillParameters.error.invalidValueForType', arguments=[Date], properties=null, defaultMessage='Specify a valid value for type Date.', field='null'}", "ValidationErrorImpl{errorCode='fillParameters.error.invalidValueForType', arguments=[Date], properties=null, defaultMessage='Specify a valid value for type Date.', field='null'}"] }}[/code] my visualize.js script is as belowvisualize({ auth: { name: "superuser", password: "superuser", organization: "organizations" } }, function(v) { v("#main").report({ resource: "/organizations/organization_1/...", linkOptions: { beforeRender: function(linkToElemPairs) { linkToElemPairs.forEach(showCursor); }, events: { "click": function(ev, link) { if (link.type == "ReportExecution") { var params = {}; for (var key in link.parameters) { if (key !== "_report") { params[key] = Object.prototype.toString.call(link.parameters[key]) !== "[object Array]" ? [link.parameters[key]] : link.parameters[key]; } } console.log(params); v("#drill-down").report({ resource: "/organizations/organization_1" + link.parameters._report, params: params }); } } } }, error: function(err) { alert(err.message); } }); function showCursor(pair) { var el = pair.element; if (typeof(el) != "undefined") { el.style.cursor = "pointer"; } } });[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now