☰
Current Page
Main Menu
Home
Home
Editing getting-reportlist-information
Edit
Preview
H1
H2
H3
default
Set your preferred keybinding
default
vim
emacs
markdown
Set this page's format to
AsciiDoc
Creole
Markdown
MediaWiki
Org-mode
Plain Text
RDoc
Textile
Rendering unavailable for
BibTeX
Pod
reStructuredText
Help 1
Help 1
Help 1
Help 2
Help 3
Help 4
Help 5
Help 6
Help 7
Help 8
Autosaved text is available. Click the button to restore it.
Restore Text
#Getting ReportList Information ##Question How do I get the ReportList Information to createmy own ReportList? ##Answer Different approaches should be used in different architectures. WebForms, MVC, and pure AJAX all have different solutions. To that end, we will explore a couple of different solutions. ###Solution 1: Webforms Here is a list of some helpful methods that allow you to obtain ReportList information with different structures. - [[AdHocSettings.AdHocConfig.FilteredListReports|/FAQ/FilteredListReports]] - [[AdHocSettings.AdHocConfig.FilteredListReportsCached|/FAQ/FilteredListReportsCached]] - [[AdHocSettings.AdHocConfig.FilteredListReportsDictionary|/FAQ/FilteredListReportsDictionary]] - [[AdHocSettings.AdHocConfig.FilteredListReportsDictionaryCached|/FAQ/FilteredListReportsDictionaryCached]] - [[AdHocSettings.AdHocConfig.ListReports|/FAQ/ListReports]] --- _**You can use this information to populate a WebForms Dropdown menu using code like this:**_ ```csharp private void PopulateReports() { ReportInfo[] reports = AdHocSettings.AdHocConfig.FilteredListReportsCached(); foreach (ReportInfo report in reports) ReportsDropDown.Items.Add(new ListItem(report.FullName, report.FullName)); //ReportsDropdown is a server-side control in your custom solution } ``` ###Solution 2: AJAX --- Here is an example of an AJAX request you can send in order to return the ReportList data. This method returns a JSON formatted object. - rs.aspx?wscmd=reportlistdata - rs.aspx?wscmd=reportlistdatalite _**In this case you could use the JSON data to populate a client-side control using javascript like so:**_ ```javascript function GetReports(keyword, category) { var requestString = 'wscmd=reportlistdatalite'; if (keyword == null) keyword = ''; requestString += '&wsarg0=' + category + '&wsarg1=' + keyword + '&wsarg2=1'; AjaxRequest('./rs.aspx', requestString, AcceptReports, GetReportsFail, 'reportlistdatalite'); } function AcceptReports(returnObj, id, parameters) { for (var rCnt1 = 0; rCnt1 < returnObj.ReportSets.length; rCnt++) { $("#ReportsDropdown").append($('<option></option>').val(returnObj.ReportSets[rCnt].Name).html(returnObj.ReportSets[rCnt].Name)); } } //Ajax request for JSON methods----------------------------------------------------------- function AjaxRequest(url, parameters, callbackSuccess, callbackError, id) { var thisRequestObject = null; if (window.XMLHttpRequest) thisRequestObject = new XMLHttpRequest(); else if (window.ActiveXObject) thisRequestObject = new ActiveXObject("Microsoft.XMLHTTP"); thisRequestObject.requestId = id; thisRequestObject.onreadystatechange = ProcessRequest; thisRequestObject.open('GET', url + '?' + parameters, true); thisRequestObject.send(); function DeserializeJson() { var responseText = thisRequestObject.responseText; while (responseText.indexOf('"\\/Date(') >= 0) { responseText = responseText.replace('"\\/Date(', 'eval(new Date('); responseText = responseText.replace(')\\/"', '))'); } if (responseText.charAt(0) != '[' && responseText.charAt(0) != '{') responseText = '{' + responseText + '}'; var isArray = true; if (responseText.charAt(0) != '[') { responseText = '[' + responseText + ']'; isArray = false; } var retObj = eval(responseText); if (!isArray) return retObj[0]; return retObj; } function ProcessRequest() { if (thisRequestObject.readyState == 4) { if (thisRequestObject.status == 200 && callbackSuccess) { callbackSuccess(DeserializeJson(), thisRequestObject.requestId, parameters); } else if (callbackError) { callbackError(thisRequestObject); } } } ``` ------ We cannot, however, provide ready-to-use examples because the code really depends on your particular use-case. Please contact Izenda Services with any questions.
Uploading file...
Header
 **This documentation is for the legacy Izenda 6 product. Documentation for the new Izenda 7 product can be found at [[https://www.izenda.com/docs/|https://www.izenda.com/docs/]]**
Sidebar
 --- * [[Izenda 7 Series Documentation|https://www.izenda.com/docs/]] * [[Release Notes]] * [[Upgrade Best Practices|FAQ/Izenda-Update-Best-Practices]] * [[FAQ]] * [[Tutorials]] * [[The Izenda API|/API/AdHocConfig]] * [[The AdHocSettings class|/API/AdHocSettings]] * [Developer Links and Guides](/Guides/Developer-Links-and-Guides) * [[Known Issues]] --- * <a href="http://www.izenda.com" rel="nofollow" target="_blank">Izenda Website</a> * [Product Video](https://www.youtube.com/watch?v=X3-yWFq0w5A) * <a href="http://www.izenda.com/blog" rel="nofollow" target="_blank">Izenda Blog</a> * <a href="http://www.izenda.com/company/" rel="nofollow" target="_blank">About Us</a> * <a href="http://www.izenda.com/contact-us/" rel="nofollow" target="_blank">Contact Us</a> --- * [Guide To Report Design](/Guides/ReportDesign) * [Making Custom Forms Video](http://www.youtube.com/watch?v=5b2axJlgdFs) --- * [[Acknowledgements]]
Edit message:
Cancel