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

print when expression for footer?


nitin403

Recommended Posts

Hi! to all.

I have created multiple groups.

In the footer of these groups I want to print a total.

 

But the footer should print only once.

So How do I find if there is no more rows available in the group element, So I can use that in "print when expression".

I tried many combination :S but noting worked.

 

 

 

Thanks for your help in advance.

 

(Also a Question about XPath for XML Datasource.

How to add elements using QueryString in JasperReport.

Let's Say I want to add some flag as per the some condition.)

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi! to all

Thanks teodord for your quick response.

I am trying to create an expense report.

In this report there are different types(Type A,B,C and misc) of expense.

Each expense type as it own tag.

In this types of expense there is multiple period tag.

In period tag there are multiple amount tag.

I am using a variable for calculating the amount and it is working fine.

 

Below is an example of what I want my report to generate

I created a group for Expense Type

Code:

Type A
Period 31-02-2007 $100
Period 31-03-2007 $12
Period 31-04-2007 $105
SubTotal $217

Type B
Period 31-02-2007 $100
Period 31-03-2007 $12
Period 31-04-2007 $105
SubTotal $217
Type C
Period 31-02-2007 $100
Period 31-03-2007 $12
Period 31-04-2007 $105
SubTotal $217
Type Misc
Period 31-02-2007 $100
Period 31-03-2007 $12
Period 31-04-2007 $105
SubTotal $217

Grand Total $868

 

When I tried with only Type A expense it worked fine.

But now I am confused:pinch: , that where should I keep The Expense header and SubTotal for each type.

 

My pervious idea was to create a group of "/TypeA/Period" and if there is no more element in it then print the subtotal.

Or if I can insert an element in query string right after "/TypeA/Period" then I can use it as a flag.

I don't want to use subReport.

Then how can I create the desire report.

 

 

Thanks for your Help in advance.

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