More Variables for Built-in Reports?
![]()
I was wondering if the predefined reports on the Administration - Tools page have more variables available?
For example, the Repository Contents report link looks like this: /ram/admin/_rlvid.jsp.faces?_rap=!repositoryMetrics&_rvip=/admin/communities.jsp&reportId=repositoryContentsReport&dateRange=week Are there other options for configuring this report available? It would be great if I could run this report but specify just one community. Likewise with the other predefined reports. Are there ways to vary those? I didn't see anything in the Help that talked about modifying these reports. I'd be interested in learning more, even if it isn't officially supported. Thanks...........Dan |
4 answers
![]()
What you see are not variables to the reports. Those are stupid Java Server Faces parameters that it requires to do navigation. The report pages have no variables other than ones that can be selected on the web page itself, if any.
Rich |
![]()
What Rich meant there, is that the url parameters are really reflecting the various links that are at the bottom right corner of the Administration page (Repository Statistics).
A workaround, is to use the Activity Audit to generate report/download a file and use a spread sheet to generate a report .... a few steps.... :-( Another option, if you get someone with some HTML/js skills, to generate a few small HTML files, that do dojo/graphics rendering for a report, and store these files as part of an asset ... so that it generates reports dynamically from a URL report. for example the following will generate a bar graph for access activity for a specific asset. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<script type="text/javascript" src="/ram/javascript/dojo/dojo150/dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"> </script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dojo._base.xhr"); dojo.require("dojox.charting.Chart2D"); dojo.require("dojox.charting.action2d.Highlight"); dojo.require("dojox.charting.action2d.Tooltip"); dojo.require("dojox.charting.widget.Legend"); </script> <style type="text/css"> @import "/ram/javascript/dojo/dojo150/dojo/resources/dojo.css"; @import "/ram/javascript/dojo/dojo150/dijit/themes/tundra/tundra.css"; @import "/ram/javascript/dojo/dojo150/dijit/themes/dijit.css"; </style> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>User Service Wrapper</title> </head>
<body class="tundra" onload="fetchActivity()">
<script type="text/javascript"> var week = [0, 0]; var month = [0, 0] var quarter = [0, 0]; var year = [0, 0];
function updateCounter(idx, delta) { if (delta<=7) week[idx] ++; if (delta<=30) month[idx]++; if (delta<=91) quarter[idx]++; if (delta<=365) year[idx]++; } function countActivity(act) { var today = new Date(); var date = new Date(act.timestamp); var delta = (today - date)/1000/60/60/24; var aid = parseInt(act.typeId); if (aid == 610 || // Download aid == 650 || // Artifact Browse aid == 621) { // Build updateCounter(0, delta); } else if (aid == 620 || // Rich Client Access aid == 560 || // Search View aid == 608 || // View aid == 630) { // Asset Subscription updateCounter(1, delta); } } function fetchActivity() { dojo.xhrGet({ // url: "/ram.ws/reporting/settings:format=json|assetActivity:guid={61BEEB23-C7DF-71F0-D101-FD54A31A2F53},version=1.0", // assetActivity: 220, 240, 280, 310, 350, 380, 480, 430, 460, 481, 431, 461, 482, 432, 462, 560, 610, 620, 621, 630, 633, 675, 680, 685, 690, 151 // artifactUseActivity: 620
// tid requires admin, ... good idea to have date limits url: "http://ramlnx:9080/ram.ws/reporting/settings:format=json|activity:tid=(650,610,621,620,560,560,608),guid={61BEEB23-C7DF-71F0-D101-FD54A31A2F53},version=1.0",
handleAs: "json", sync: true, load: function(response, ioArgs) { for (i=0;i<response.length;i++) { countActivity(response[i]); } // normalize for weekly avg. month[0]/=4; quarter[0]/=12; year[0]/=52; month[1]/=4; quarter[1]/=12; year[1]/=52;
chart(); return response; }, error: function(error, ioArgs) { consol.error("failed xhrGet"); return error; } }); }
function chart() { var dc = dojox.charting; var chart1 = new dc.Chart2D("chart"); chart1.addPlot("default", {type: "ClusteredColumns", gap: 2}); chart1.addAxis("x",{minorLabels: true, labels: [{value: 1, text: "LastWeek"}, {value: 2, text: "Last Month"}, {value: 3, text: "Last Quarter"}, {value: 4, text: "Last Year"}] } ); chart1.addAxis("y", {vertical: true, includeZero: true, majorTick: {color: "red", length: 6}, minorTick: {stroke: "black", length: 3} }); chart1.addSeries("Views", [ week[1], month[1], quarter[1], year[1] ], {fill: "lightgreen"}); chart1.addSeries("Downloads", [ week[0], month[1], quarter[1], year[1] ], {fill: "lightblue"}); var h = new dc.action2d.Highlight(chart1, "default"); var t = new dc.action2d.Tooltip(chart1, "default"); chart1.render(); var l = new dojox.charting.widget.Legend({chart: chart1}, "legend"); } </script>
<table border="0"><tr valign="top"> <td> <div id="chart" style="width: 400px; height: 300px;"></div> </td> <td> <div style="border: 1px solid #888888; padding: 5px; background-color: rgba(255, 255, 221, 0.8);"> <div id="legend" ></div> </div> </td> </tr> </table> </body> </html> Comments Be aware of one thing with this. This will bring down the entire result before processing starts. So if there is a large time range there could be very many metrics and it would be brought completely into the browser memory and processed. |
![]()
Yes... hence, date/time limits should apply
|
![]()
Yeah, I started out using url reporting to get around the hard coded limits in the Activity Audit reports. URL reporting is so painful to do, especially when you have a lot of different reports that you want to run using different time periods. And they aren't very forgiving when something goes wrong. The error messages don't give you much of an idea what you did wrong. Generally, when I make a mistake in the url, I just get no data back and no error message, so there's a lot of guessing and experimentation involved.
If you guys ever decide to overhaul the reporting capabilities and need volunteers for input, count me in. Reporting is probably the biggest frustration I have with RAM (lifecycles, comes second). Overall, I really like the tool. But reporting gives me fits. Cheers.............Dan |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.