Difference between revisions of "Report URL"

From SmartWiki
Jump to: navigation, search
(Add details on how to pass criteria through within the URL)
 
Line 41: Line 41:
 
::- A portion of the HTML code for the page will display and the selected element will be highlighted. Within the highlighted section, search for the text within '''id="'''''cf_0_1050_0'''''"'''.  
 
::- A portion of the HTML code for the page will display and the selected element will be highlighted. Within the highlighted section, search for the text within '''id="'''''cf_0_1050_0'''''"'''.  
 
::- Copy the ID for use in your URL. Repeat for all prompts on the page.
 
::- Copy the ID for use in your URL. Repeat for all prompts on the page.
** This must be repeated for every criteria prompt configured on the report otherwise the results will not display.
 
 
* '''criteriatext''' is the @variable@ or criteria text you wish to pass to the criteria input specified.
 
* '''criteriatext''' is the @variable@ or criteria text you wish to pass to the criteria input specified.
  

Latest revision as of 14:26, 12 July 2017

Linking to a Specific Report

In order to add a link to a specific report to a portal, or to create a link elsewhere in the system, you need the URL of the report in question.

To retrieve the report's URL:

  1. Hover your cursor over the Run Report icon NewRunReportIcon2.png for the report whose URL you wish to retrieve.
  2. Right-click on the icon and copy the link location*.
  3. Paste the report URL into a word processing program, or directly into the URL setting on the Portal Set-up page.
CopyLinkLocation.png
* Note: different Internet browsers use different terminology for copying the link location. 
Mozilla Firefox uses Copy Link Location
Internet Explorer uses Copy Shortcut
Chrome uses Copy link address
etc.

The syntax for the report URL will be:

http://your url/userreport/ur_viewreport.jsp?nextlevel=1&reportid=report id&reportname=report name
where:
 your url is the URL used to access your copy of SmartSimple, for example grants.smartsimple.us
 report id is the unique ID number of the report
 report name is the name of your report, with spaces between words replaced with the plus sign "+"

NOTE: If you do not include the report name parameter then the report will display with the stored report name. If the report link has a report name parameter included then the report displays with the name passed in the parameter.

Passing Criteria into a Report via the URL

If the report is configured to prompt for criteria and you would like to pass the criteria through within the URL using a variable or hard-coded text, the syntax is:

http://your url/userreport/ur_openreport.jsp?nextlevel=1&reportid=report id&reportname=report name&cf_x_123456=criteriatext
  • ur_openreport.jsp will tell the system to open the results of the report (bypass the criteria prompt screen)
  • cf_x_123456 is the html field id of the input field for the criteria as displayed within the report criteria prompt screen.
    • x represents the order in which the criteria is prompted (starting at 0).
    • 123456 represents the unique id given the prompt field.
- To retrieve this criteria prompt identifier, run the report normally to bring up the criteria prompt page.
- Right-click on the prompt input field with your mouse and select Inspect or Inspect Element.
- A portion of the HTML code for the page will display and the selected element will be highlighted. Within the highlighted section, search for the text within id="cf_0_1050_0".
- Copy the ID for use in your URL. Repeat for all prompts on the page.
  • criteriatext is the @variable@ or criteria text you wish to pass to the criteria input specified.


See Also