Jump to content
Changes to the Jaspersoft community edition download ×

How to Filter Data in adhoc Report


ravi_sati

Recommended Posts

I am Using the Jasperserver-pro.

I am not able to do the filtering of report data depending upon the values selcted through input control. its always showing me all the records.


I created 1 Topic say "Test" without any condition as i want condition to be put in report level not at Topic level(it will be applicable to all the reports ). One input control is created which is taking values from a query. I maped this input control with my report through control and resource section in Report-Wizard. When i am running the report its prompting me for input criteria which is comming correctly though query. when i select any value from the values dislayed on input control, its not filtering the data. Report is still showing all the recrods.


How can i Filter the data on Report?
 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 

Ad Hoc reports inherit their parameters (and corresponding input controls) from the Topic upon which they are based. Define the parameters in your Topic, define the input controls when you upload the Topic to the repository, and the reports created against that Topic will have those parameters and input controls.

 

Thanks,

 

Kristen

Link to comment
Share on other sites

Thanks Kristen

The way you told it was working. What the requirement is 1 Topics will be used to generate many reports with and without inputcontrols. If i define parameter at Topics level that will be applicable to all the reports and prompting same criteria(correct me if i am wrong) which we done want.

Is there any way to make different input control conditions on different reports from same topic ?

I tried one more thing on ur suggestion. Created 1 Topics without any Condition. Later i edited that topic and added input control(List)  which is taking values from  query . I created a report out of that topic, which is prompting me the condtion i added in topic and the values in that input list are also correct(query giving correct results to input control), but when i select any value from that list , data is not getting filtered on report.

This is again similar what i asked in my 1st thread.

Thanks

Ravi

Link to comment
Share on other sites

Hi Ravi

Does your topic jrxml contain at least one parameter element?

e.g.

<parameter name="Country" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["Mexico"]]></defaultValueExpression>
</parameter>

 

 

As Kristen pointed out - without these parameters, Input Controls in Ad Hoc will not work properly.

BTW If you assign default values to the parameter(s) the user of the generated reports will not be prompted.

Hope this helps

Angus

 



Post Edited by angus at 05/28/2009 18:37
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...