Jump to content
JasperReports Library 7.0 is now available ×

To remove duplicate values from two subreport


chandra_anand

Recommended Posts

Hello,

I have created a subreport having a datasource expression and removing the duplicate values by deactivate Print Repeated Value which give me Unique value.

Again I have created another subreport having different datasource expression and removing the duplicate values by deactivate Print Repeated Value which give me Unique value.

However when I am putting this on Main jassper it is giving me repeated values because of there are common values available in 1st and 2nd subreport.

How would I remove the common values from these 2 subreport? Please suggest as it is urgent.

Appreciate you in advance..!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Not sure if I understood correct...

but in general: how should the second subreport know what eventually the first subreport has already printed?!? That's not possible with the simple PrintRepeatedValue flag.

Perhaps you could described more in detail what data are common and when they should surrpressed.

E.g. perhaps you could pass a flag to the second subreport for filtering duplicate values out? Perhaps you could modify your sql-query already to exlude results from the first subreport.... so many potential solutions, if the problem is really known. :-)

So perhaps just post some screenshots to understand the problem.

hth + regards

C-Box

Link to comment
Share on other sites

Let me clarify ths: This is related to XML path not sql query. I am providing XML path in datasource expression of both subreport. XML path is different in both subreport.

1st subreport is printing Borrower Email address from Borrower table which is giving me unique value like:

ab@gmail.com

xy@gmail.com

bc@gmail.com

2nd subreport is printing Borrower Email address from Esign table which is giving me unique value like:

ac@gmail.com

yz@gmail.com

ab@gmail.com

bc@gmail.com

Here when I am including both subreport on Main jrxml file then it is printing all email address from 1st subreport and 2nd subreport like this:

ab@gmail.com

xy@gmail.com

bc@gmail.com

ac@gmail.com

yz@gmail.com

ab@gmail.com

bc@gmail.com

Now ab@gmail.com and bc@gmail.com is printing twice here. I want to print this at one time only. Want to remove the duplicate one.

How to remove this? Please suggest.

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