Jump to content
Changes to the Jaspersoft community edition download ×

Filtering table data based on a text field


richard.savage_1

Recommended Posts

Hello

I'm using Jasper Studio 6 to design my reports and I have come up against problem that is driving me mad!

My report contains a number of fields (contractName, contractNumber, contractDescription etc.) and a table based on a dataset containing 2 fields (contractNumber, contractDocuments).

When I preview the report, the contract documents are shown on all records, not the one contract record they belong to. How do I stop that happening?

e.g. contract1 table is blank, contract 2 table contains the document entries?

Thanks for any help!

Richard S

 

UPDATE

I have fixed the issue now, by adding the parameter to the main report and another to the dataset query, mapping them together and a fair bit of jiggery pokery!

Thanks for your help and pointing me in the right direction.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Yes, I created a parameter called 'contractNumber' which contains the following:

$P{contractNumber}.equals($F{contractNumber})

I then created a parameter on the dataset called 'table_contractNumber' which contains the following:

$P{table_contractNumber}.equals($P{contractNumber})

The dataset is an aggregate query where I unwind fields from a MongoDB array if that makes a difference?

Thanks

Link to comment
Share on other sites

Hi, I have been working through a number of threads and documents around the web; so to summarise as best as possible:

My main report has a param CONTRACT_NUMBER which prompts for a value. This is passed to the Mongo query and works fine.

The table has a param called TABLE_CONTRACT_NUMBER whose expression is $P{CONTRACT_NUMBER}, and if I read your comment correctly, I have to add the TABLE_CONTRACT_NUMBER param to the dataset for the table?

Thanks

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