Search code examples
javascriptbirt

actuate.Parameter is not a constructor


I am integrating JSF with Birt report and able to connect with IHub server from Java code. Also got all the reports file inside some particular folder and displaying the report file name it into the JSF Datalist .Now when anyone will click on report file name i am calling a JavaScript method which will display the parameters required for report generation and using below code

function displayParams(reportName) {

    prmRptName = reportName;
    param = new actuate.Parameter("panel");
    console.log("Display Params"+param);
    alert(param);
    document.getElementById("reportsForm1:reportsTable").style.display = 'none';
    param.setReportName("Applications/Sure Project/Report Designs/"
            + prmRptName);
    param.submit(function() {
        document.getElementById("backbutton").style.visibility = 'visible';
        document.getElementById("run").style.visibility = 'visible';
    });
    // console.log("Display Params");
}

but this line of code

param = new actuate.Parameter("panel");

throwing exception

actuate.Parameter is not a constructor

Any idea what i am doing wrong . here panel is a id of DIV component which is inside the XHTML page


Solution

  • Issue is resolve ,cause of problem is Birt Server URL

    i was trying this code

    function initReportExplr() {
        actuate.load("viewer");
        actuate.load("parameter");
        var reqOps = new actuate.RequestOptions();
        actuate.initialize("http://locahost:8700", reqOps,
                                "administrator", "", "");
        }
    

    while it should be like this

    function initReportExplr() {
        actuate.load("viewer");
        actuate.load("parameter");
        var reqOps = new actuate.RequestOptions();
        actuate.initialize("http://locahost:8700/iportal", reqOps,
                                "administrator", "", "");
        }