Comments
-
Hi Jodi, To pass the selected records as parameters to the reports, it is best to have the reports display on the Grids where you can select multiple records. But for these to work, make sure that your reports use Joins in the queries to retrieve the data. Once you have designed a report including joins in queries you would automatically get the option to run report for selected records. HTH Sam
-
What is the best way to pass the selected rows to Reporting Services for use in a report? I can't seem to get it to work I created a dataset that accepts @id as the selected rows and uses "IN" like so: select * from table where table.guid IN ( @id). Here's my java snippedt in the onload: listselecteditems = function () { // get array of selected records var frameDoc = document.getElementById("IFRAME_Saw").contentWindow.document; var a = frameDoc.all['crmGrid'].InnerGrid.SelectedRecords; var selectedItems = new Array(a.length); // var theRows = "("; var theRows = ""; for (var i=0; i < a.length; i++) { selectedItems[i] = a[i][0]; var guid = selectedItems[i] .substr(1,36); // alert("guid " + guid); // theRows = theRows + "'" + guid + "'"; theRows = theRows + guid ; if (i != a.length - 1) { theRows = theRows + "," } } // theRows = theRows + ")"; alert(theRows); var thisServer = (SERVER_URL.substr(7,6)); if (thisServer == "crmtst") { Url = 'http://crmtstdb.mhc.trk/Reportserver?%2fMHC_MSCRM%2f'; } else {Url = 'http://crmdb.mhc.trk/Reportserver?%2fMHC_MSCRM%2f'; }; var restOfUrl = '&rs:Commmand=Render&'; restOfUrl = restOfUrl + 'rs:Format=PDF&rs:ClearSession=true&id=' + theRows; Url = Url + 'Test'+ restOfUrl; window.open(Url,'_blank', 'toolbar=0,status=0,resizable=1'); }
*This post is locked for comments