If you are unable to create a new account, please email support@bspsoftware.com

 

possible to output Objects' Properties from Report Studio to an XML report?

Started by MungTheWicked, 02 Aug 2011 05:25:28 PM

Previous topic - Next topic

MungTheWicked

Hi. I and a colleague of mine are using Cognos 8.4 and Report Studio.

Background: I'm a programmer/developer. An application I'm writing will be reading .xml files generated by Cognos and dumped to a folder visible within an intranet network domain. I'm going to parse the generated .xml files for all the necessary values needed to display several reports at once on a "dashboard" on a huge flat-screen TV using JavaFX.  Actually, there will be 60-something TV's at 60-something locations throughout the U.S., and each TV will be hooked up to its own computer.  Each computer will be on the same domain as the server where Cognos will dump the .xml files.  JavaFX has great graphical and animation capabilities - this has to look slick.  There will be approximately 8 reports displayed on the dashboard at once, maybe 1 report taking up a larger center-stage spot on the TV.  Each report will be animated and operating independently from one another (multi-threaded). Each report object on the dashboard will create its own thread based on a time interval value set in each .xml file representing a particular report.  That time interval will determine when that particular report on the dashboard needs to grab an updated .xml file from the intranet domain folder.  Cognos will regenerate each report according to when each report is scheduled to refresh itself.

Everything is fine except for one problem: I really need Properties of objects within Report Studio to be output as values to the .xml files.  Everything else is accounted for except for this big hurdle.  I really don't want to build an application that's built on a house of cards and forced to expect a certain format per report that can never change.  I would like to simply read values dynamically and construct whatever bar graph, pie chart, line graph, combo graph, etc. that's thrown at me.

Here's a simplified example of 1 particular .xml file I'm reading and parsing.  As an illustration of my problem, there are no values telling me the range of the Y-axis, the interval of the Y-Axis, or which Y-Axis should be shown or hidden:

<?xml version="1.0" encoding="utf-8" ?>
<dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<crosstab>
<values>
<value row="R1" col="C1">0.98438525</value>
<value row="R1" col="C2">0.97945023</value>
<value row="R1" col="C3">0.9762517</value>
<value row="R1" col="C4">0.97377407</value>
<value row="R1" col="C5">0.97169532</value>
<value row="R1" col="C6">0.98068723</value>
<value row="R1" col="C7">0.97333118</value>
<value row="R2" col="C1">54</value>
<value row="R2" col="C2">69</value>
<value row="R2" col="C3">100</value>
<value row="R2" col="C4">134</value>
<value row="R2" col="C5">153</value>
<value row="R2" col="C6">76</value>
<value row="R2" col="C7">99</value>
</values>
<corner>
<caption />
</corner>
<columns>
<colEdge>
<caption>2010</caption>
<colEdge id="C1">
<caption>December</caption>
</colEdge>
</colEdge>
<colEdge>
<caption>2011</caption>
<colEdge id="C2">
<caption>January</caption>
</colEdge>
<colEdge id="C3">
<caption>February</caption>
</colEdge>
<colEdge id="C4">
<caption>March</caption>
</colEdge>
<colEdge id="C5">
<caption>April</caption>
</colEdge>
<colEdge id="C6">
<caption>May</caption>
</colEdge>
<colEdge id="C7">
<caption>June</caption>
</colEdge>
</colEdge>
</columns>
<rows>
<rowEdge id="R1">
<caption>% Yield</caption>
</rowEdge>
<rowEdge id="R2">
<caption>No Takes</caption>
</rowEdge>
</rows>
</crosstab>
</dataset>


In this case, I have the values for the X-axis ticks (December 2010, January 2011, February 2011, etc.). Obviously, The X-axis tick caption for C1 matches up to R1, C1 and R2, C2. I need the range for the Y-axis. This example also illustrates my dilemma of "Which Y-axis values do I pick to be the actual Y-axis?" I need a means of populating a value in the .xml file that indicates which Y-axis is the primary Y-axis (show or hide). As far as the Y-axis values, even if it was the min value, max value, and increment value, that would suffice. If each individual Y-axis tick value was listed like the values for the X-axis and there was a value listing the increment, that would also suffice.

How can objects' properties be output as values within .xml files produced by Report Studio?

Thanks in advance!

sjfamily84

We, too, would like to parse a report's XML output.  Our need is that we will have hundreds of reports, most interconnected by drillthru and html links.  Would like a dynamic way to document the inter-relationship, parameters, and track developer-created scripts.

Any ideas?