Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Passing multiple Int values into a 'drill through' parameter
CodeRookie
<p>Good morning, all!</p>
<p> </p>
<p>Here's the problem I've run into: I have a top level report that collects a number of 'heat_no' (Integer) values when run, and dumps the values into a parameter (heatNum). This parameter does nothing other than collect data.</p>
<p> </p>
<p>On the report table, I have a binding called 'Heats' that takes all of the values in the parameter, and combines them into a comma-separated string by using <strong>params["heatNum"].value.join(",")</strong>. I have second binding ('TEST') that is in the footer of the table just so I can see what values are captured.</p>
<p> </p>
<p>Now, the main part of this report is a linear gauge gadget. I have interactivity on, and I'm passing the value of <strong>row["Test"]</strong> to the drill report into a parameter (heatNo) that is an integer . The problem I'm running into, is that I cannot for the life of me get the values being passed to work..... I can't seem to find the correct way to break the individual values out of the string, then put them back together as INT values so I can use them for <strong>WHERE heat_no IN (....)</strong> in my query for the second report.</p>
<p> </p>
<p>
Find more posts tagged with
Comments
CodeRookie
<p>One thing I did notice, if I set a data binding equal to the params["heatNo"] of the second report, set it to Integer, and throw it in the table, I get an output of: <strong><span style="background-color:rgb(237,238,243);color:rgb(102,102,102);font-family:Arial;font-size:13.3333px;font-weight:bold;">[Ljava.lang.Object;
@f31ac66<
;/span></strong></p>
<p>If I set the binding to Java Object, I get <span style="background-color:rgb(237,238,243);color:rgb(102,102,102);font-family:Arial;font-size:13.3333px;font-weight:bold;">[214234, 214235, 214236]</span><br>
which are the numbers I chose to pass in...... So, I suppose the data is getting passed, just not in the correct format.</p>
<p> </p>
<p>Scott</p>
pricher
<p>Hi Scott,</p>
<p> </p>
<p>I am sending you a example that works. TopReport has a parameter, pCustNum, similar to the one you created, i.e. multi-value list of integers. In the table, I have created a binding based on that parameter, custNum, using the same syntax you have. A hyperlink to BottomReport is created on custNum in the footer of the table. In BottomReport, the beforeOpen of the data set is used to modify the query using the .join() method to create a string from the array of integers passed to the report. (You can verify that it is an array passed to the report as I display the parameter on top of the table.) Now, I have also created a hyperlink directly on parameter pCustNum in TopReport. Notice that it works the same way, i.e. the values of the parameter are passed as an array of integers.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
CodeRookie
<p>Pierre,</p>
<p> </p>
<p>I can always count on you to come through! I'll download the example, apply the principles to my reports, and get back to you with the results.</p>
<p> </p>
<p>Thanks,</p>
<p>Scott</p>
CodeRookie
<p>Pierre,</p>
<p>So, I followed your examples (mine were set up almost the same), and I get the values passed between the two reports, but the report doesn't spit out any data. The interesting thing is, I get these three warnings in BRD Pro as the second report is running:</p>
<p> </p>
<p><strong>MESSAGE GetReportTOCTask: no TOC found fileName=/$$$Transient/acfile540.rptdocument nodeName=4.265100596239287</strong></p>
<p> </p>
<p><strong>MESSAGE GetReportTOCTask: class com.actuate.reportapi.enginemanager.JREMException</strong></p>
<p> </p>
<p><strong>com.actuate.reportapi.enginemanager.JREMException: Cannot get table of contents from file /$$$Transient/acfile540.rptdocument 4.265100596239287</strong></p>
<p> </p>
<p>Don't know if they are pointing to what the issue may be, but I figured I'd send them on.</p>
<p> </p>
<p>Thanks,</p>
<p>Scott</p>
CodeRookie
<p>Pierre,</p>
<p>I found the issue...... It was a data problem. I was trying to pass all the heats at once, and once I knocked it down to the first two in the list, it worked fine. So, now I just have to track down the data issue.</p>
<p> </p>
<p>Thanks for your help, and have a great weekend!!!</p>
<p> </p>
<p>Scott</p>
pricher
<p>Good to know!</p>
<p> </p>
<p>P.</p>
CodeRookie
<p>Pierre,</p>
<p> </p>
<p>Good morning! Now that I know what my issue was with the report is, another question has surfaced. How do I get the parameter to choose 'All' values passed from the data set as its default without any interaction by the user (I think I have an idea of how to do this, but just want to make sure)? This report is actually a dashboard 'gadget' which only shows a linear gauge (no parameters are visible). I'm only using said parameter to catch all heat numbers within the time frame of the report running to pass to the drill-down report. While I was testing, I was actually selecting the values to pass. Any thoughts?</p>
<p> </p>
<p>Thanks,</p>
<p>Scott </p>
pricher
<p>Hi Scott,</p>
<p> </p>
<p>If you just want to pass a list of Heat Numbers from your gauge to the drill down report, you don't need a parameter. What you can do is create a Computed Column in the query that gives you the Heat Numbers that will concatenate all the heat numbers into one column. That column will be used as the value passed from the gauge to the drill-down report. </p>
<p> </p>
<p>In the attached example, I have create a computed column called "CustomerNumbers" in the query:</p>
<p>
CodeRookie
<p>Pierre,</p>
<p> </p>
<p>Thanks for the example! Unfortunately, I had tried this as well, but the CONCATENATE is breaking my heat numbers into three digits each (they are currently six digits). Is there a way to specify where it should place the "," to split the list up?</p>
<p> </p>
<p>EDIT: I did find this article:</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/19456-concatenate-function-improperly-formatting-numbers/'>http://developer.actuate.com/community/forum/index.php?/topic/19456-concatenate-function-improperly-formatting-numbers/</a></p>
;
<p> </p>
<p>I'll give that a shot and see what happens.....</p>
<p> </p>
<p>Thanks,</p>
<p>Scott</p>
pricher
<p>Interesting behavior that I did not know about...</p>
<p> </p>
<p>Try the following syntax in the Expression of the computed column:</p>
<pre class="_prettyXprint _lang-">
Formatter.format(row["heat_no"],"#")
</pre>
<p>It will remove the thousand separator commas.</p>
<p> </p>
<p>P.</p>
CodeRookie
<p>Pierre,</p>
<p> </p>
<p>That took care of the issue. Thanks again for the help!</p>
<p> </p>
<p>Scott</p>
micajblock
<p>or use a different separator in the concat function.</p>