Passing multiple Int values into a 'drill through' parameter

Good morning, all!


 


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.


 


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 params["heatNum"].value.join(",").  I have second binding ('TEST') that is in the footer of the table just so I can see what values are captured.


 


Now, the main part of this report is a linear gauge gadget.  I have interactivity on, and I'm passing the value of row["Test"] 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 WHERE heat_no IN (....) in my query for the second report.


 


Scott Stanley

Business Analyst

North Star BlueScope Steel, LLC

 

Comments

  • 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:  [Ljava.lang.Object;@f31ac66


    If I set the binding to Java Object, I get [214234, 214235, 214236]

    which are the numbers I chose to pass in...... So, I suppose the data is getting passed, just not in the correct format.


     


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • Hi Scott,


     


    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.


     


    Hope this helps,


     


    P.


    Pierre Richer

    Solutions Consultant, Analytics & Reporting

    OpenText

     

  • Pierre,


     


    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.


     


    Thanks,


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • edited April 21

    Pierre,


    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:


     


    MESSAGE GetReportTOCTask: no TOC found fileName=/$$$Transient/acfile540.rptdocument nodeName=4.265100596239287


     


    MESSAGE GetReportTOCTask: class com.actuate.reportapi.enginemanager.JREMException


     


    com.actuate.reportapi.enginemanager.JREMException: Cannot get table of contents from file /$$$Transient/acfile540.rptdocument 4.265100596239287


     


    Don't know if they are pointing to what the issue may be, but I figured I'd send them on.


     


    Thanks,


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • Pierre,


    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.


     


    Thanks for your help, and have a great weekend!!!


     


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • Good to know!


     


    P.


    Pierre Richer

    Solutions Consultant, Analytics & Reporting

    OpenText

     

  • edited April 24

    Pierre,


     


    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?


     


    Thanks,


    Scott 


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • Hi Scott,


     


    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. 


     


    In the attached example, I have create a computed column called "CustomerNumbers" in the query:


    Pierre Richer

    Solutions Consultant, Analytics & Reporting

    OpenText

     

  • edited April 24

    Pierre,


     


    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?


     


    EDIT:  I did find this article:


     


    http://developer.actuate.com/community/forum/index.php?/topic/19456-concatenate-function-improperly-formatting-numbers/


     


    I'll give that a shot and see what happens.....


     


    Thanks,


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • Interesting behavior that I did not know about...


     


    Try the following syntax in the Expression of the computed column:



    Formatter.format(row["heat_no"],"#")

    It will remove the thousand separator commas.


     


    P.


    Pierre Richer

    Solutions Consultant, Analytics & Reporting

    OpenText

     

  • Pierre,


     


    That took care of the issue.  Thanks again for the help!


     


    Scott


    Scott Stanley

    Business Analyst

    North Star BlueScope Steel, LLC

     

  • mblockmblock Expert Member

    or use a different separator in the concat function.


    Regards,

    Mica J. Block

    Principal Analytics Architect

    OpenText Corporation

Sign In or Register to comment.