Jump to content
We've recently updated our Privacy Statement, available here ×

Multi-select Query produces one result


jasonhurd

Recommended Posts

Hello

I am new to JaspserSoft. I'm trying to create a multi-select query via the server but it is only producing one result. I am using SELECT DISTINCT but even if I drop the distinct it only produces one result. I'm pulling my hair out trying to sort this out. I have tried different class types in the designer but I don't think that actually has any effect. I don't even know how to select a Multi-select Query in the studio.

It's a bit silly that there is no documentation on setting any of this sort of thing up. I'm actually finding it not as user friendly as SSRS which is a bit sad. I am basically testing Jaspersoft server out as it has a much more pleasent interface.

With that said though, I am giving it my best effort as I really would like this software to work for our business. Any help would be much appreciated.

Jason

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

The query is fairly basic in which I though I was detailed enough, but none-the-less, the query is SELECT DISTINCT <column> FROM <table>. As I said in the main post, even if I drop the distinct, it still only produces one result.

The column is a data type char(8), has hundreds of rows with four distinct fields currently.

Thanks!

Link to comment
Share on other sites

  • 5 weeks later...

The where clause changes when doing more of an IN statement. It would be Where $X{IN,field_name, parameter} but the Parameter Class needs to be a java.util.Collection. Defaults can be assigned there as well.


This is one I use:


Where $X{IN,agent_name,agent_namelist}


agent_name is my table column and agent_namelist is the parameter I use as a collection for the in statement.


Then for the multi select statement on jasperserver I just use Select Distince agent_name from table order by agent_name


You have to make sure that the parameter name used in the report is the exact same as the input control name and it should work. I just changed to jasperserver a few months ago from SSRS for 10 years. There is a little learning cliff but it seems to do everything I did in SSRS.


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...