Integrations: Using the APIs with a Summary Viewer
Last Updated - Mar 10, 2015Home | Links to your Reports | Links to Data Cookbook | Pop-up/Frame | Argos
Providing a Summary Viewer
Example

You can provide a summary view of a specification from your Data Cookbook to any user, even if they are not logged in to the Data Cookbook. This summary viewer is an HTML file hosted on your own internal servers. Once set up, you will be able to link to it just like linking to the Data Cookbook. There are links on this summary viewer that will take the user directly to the Data Cookbook to view the details, add comments, or even request a change to the specification. Since this is a locally hosted HTML file, you may modify it to your own styling.
How to do it
To do this, you will need to download a single html file, configure it, then deploy it on an internal server. Once it has been deployed on an internal server, it can then be linked to from any report.Step 1: Download and Configure the HTML File
Download zip file from our Github repository Unzip to get the dcb_spec_summary.html fileOpen the HTML file in a text editor. There are instructions at the top. The only required change is to enter your credentials in the top of the file.
Step 2: Deploy and Test the HTML File
Place the file on an internal web server so that it can be accessed with a browser. In order to test it, you need to identify an approved* report you want to test it with. The ID of an approved report is shown in your browser address bar whenever you are accessing a report. It is the integer at the end of the URL (bolded in the example below):https://myschool.datacookbook.com/institution/reports/9999Once you have the approvedreport ID, you can use the following URL to test it (replacing MYSERVER/PATH with the internal server/path for the HTML file and replacing 9999 with the report ID):
http://YOURSERVER/PATH/dcb_spec_summary.html?report_id=9999
Step 3: Place link on reports
Now you can place the link to this file on any report (in a text label or button). For each report where you use this, you will simply need to replace the report ID in the URL and it will work for that report.*Note: If you want to use this for unapproved reports, see the comments in the HTML for how to use the version_id parameter instead of the report_id parameter on the URL.
New Example of a using a Button and using PHP
Show Summary in a Pop-up Window
With the summary viewer, you can also present it as a pop-up window. This will allow the user to quickly view the summary without interrupting their workflow and place on the report. This solution will only work with reporting tools that allow you to place small bits of HTML directly on the report. Many dashboard tools will allow this, Argos will allow this (for web viewer only), Pyramid Dashboards, and Cognos will also allow it.
How to do it
This is done with the same HTML file used for the Summary Viewer. Complete the steps above first.Place the HTML on a report
Paste the following HTML on your report. You will need to replace the bolded items as needed. You can also adjust the height and width as needed and the text that shows as the link.<a href="http://YOURSERVER/PATH/dcb_spec_summary.html?report_id=9999" onclick="javascript:void window.open( 'http://YOURSERVER/PATH/dcb_spec_summary.html?report_id=9999', 'datacookbook', 'scrollbars=yes,center,height=600,width=450'); return false;">View the Data Cookbook Information for this Report</a>
Show Summary in a Frame
With the summary viewer, you can also embed it as a frame. This will allow an infrequent user to have the information immediately available without them having to click on anything. This solution will only work with reporting tools that allow you to place small bits of HTML directly on the report. Many dashboard tools will allow this, Argos will allow this (for web viewer only), Pyramid Dashboards, and Cognos will also allow it.
How to do it
This is done with the same HTML file used for the Summary Viewer. Complete those steps first.Place the iframe/web content on a report
Create an iframe or web viewer object on your dashboard/report layout. You will need to then place the following URL as the source of the content for that iframe. Replace bolded items as needed. You may also want to set the height and width of the frame.http://YOURSERVER/PATH/dcb_spec_summary.html?report_id=9999If you need to code the iframe itself in html, you can use the following example:
<iframe src="http://YOURSERVER/PATH/dcb_spec_summary.html?report_id=9999" width="450" height="600"></iframe>