Clarity

  • 1.  Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-06-2017 02:54 PM

    I made a copy of the "Capacity vs Demand by Role" report and added an input control for "Investment Type" to the resources. I then updated the query to add "$X{IN, i.investment_type_key, investmentTypeKey_1}" to the WHERE clause of the SQL statement (in which the dwh_inv_investment table is selected as i - see attached) and added a parameter for investmentTypeKey_1 on both subreports.

     

    The report loads and includes the Input Control option for Investment Type displays and populates correctly, however, if I select any option, it does not change the results that display in the report.

     

    Is there a piece I have missed?

    Attachment(s)



  • 2.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Broadcom Employee
    Posted 07-15-2017 03:45 PM

    Hi there,

     

    I think your parameter investmentTypeKey_1 may not be populating with the value from the input control which is why it does not affect the filter.  

    Did you create a new parameter in the Jasper report called investmentTypeKey_1 which has a type of java.util.Collection ?

    Regards

    James



  • 3.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-17-2017 10:25 AM

    Thanks for the suggestion, James - however, I did have the parameter of investmentTypeKey_1 with the type java.util.Collection on the Jasper report, but it was still not impacting the query.

     

    I have gone back and verified that the parameter is listed on the main report as well as both subreports, but I'm still getting the same query results.



  • 4.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Broadcom Employee
    Posted 07-17-2017 10:40 AM

    Thanks for the updates knoxcorr. 

     

    Can you check you are passing the parameter down to the subreport.  The input control will populate the main report parameter then this needs to be passed to each subreport. 

    If you select the subreport object in Jasper Studio under the properties tab you have an option called Subreport.  Under here click the Edit Parameters button ad make you have the name as investmentTypeKey_1 with an expression of "$P{investmentTypeKey_1}”



  • 5.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-17-2017 11:04 AM

    I hadn't been passing the parameter down to the subreport, but when I went back to the report and did so, the query results were still not impacted. (I was really hoping that was it and I could reply with "Success!", but alas, I cannot).



  • 6.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Broadcom Employee
    Posted 07-17-2017 11:08 AM

    Are you able to zip up the main and sub report JRXML files and attach them here so I can take a look?



  • 7.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-17-2017 11:30 AM

    Thank you for helping me with this. I've attached the zipped file to the original post (since I couldn't find a way to add it here).



  • 8.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-17-2017 10:43 AM

    Did you pass the new parameter to the subreports?



  • 9.  Re: Added Input Control to OOTB Report; Not Filtering Report
    Best Answer

    Posted 07-17-2017 06:19 PM

    Hi,

     

    I'm pretty sure the problem is that the Nested Type Name for investmentTypeKey_1 is blank.  

     

    I changed it to java.lang.String in all 3 reports and the report seemed to return different values based on investment type selected.   

     

     

    Give it a try and let me know if it solves your problem.

     

    Regards,

    Steve



  • 10.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Posted 07-18-2017 11:32 AM

    Thank you so much - that worked! I think we would have given up if it hadn't been for you two!

    SteveTroy and JamesLaverick you rock!



  • 11.  Re: Added Input Control to OOTB Report; Not Filtering Report

    Broadcom Employee
    Posted 07-18-2017 11:36 AM

    Thanks.  :) You are welcome.


    That is great news that you got it working.