Hi Ramesh,



Please try with the below code:



var baseUrl = gs.getProperty("glide.servlet.uri");


var gr = new GlideRecord("change_request");


gr.addEncodedQuery("active=true");


gr.query();


if (gr.getRowCount() > 0) {


template.print('<table border="1"><th colspan="4" style="text-align:center">Change Request Report</th>');


    while (gr.next()) {


        template.print('<tr><th><a href=' + baseUrl + gr.getLink() + '>' + gr.getValue('number') + '</a></th><th>' + gr.short_description +'</th><th>'+           gr.getDisplayValue('state') + '</th><th>'+ gr.getDisplayValue('type') +'</th></tr>');


}


template.print('/table');


}



Thanks,


Prateek Gupta