Jump to content

Sort and group records by field and print section


atsu

Recommended Posts

Hi there,

I need to do this in the next 48 hours and it just won't work. somebody please help me out.

I am writing an application for a fishing harbour

I need to create a quarterly and yearly report from a database such that I'll sort and group records by the date of arrival of the

vessel and print the section for every month as attached to the letter. Please help me out because  I really don't know how to go about it

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Well, you need to build a query with a "group by" clause. For example:

select

arrival_date,
sum(squid) as squid total,
sum(fish) as fish_total

from

(your db table)

group by arrival_date

 

Hope this helps,

David



Post Edited by despec at 08/18/2010 20:25
Link to comment
Share on other sites

  • 8 months later...

 Hi All,

 

How can I have the same result using Xpath query? I'm new with jasper reporting. thanks in advance

 

br,

Joel

Code:
selectarrival_date,sum(squid) as squid total,sum(fish) as fish_totalfrom(your db table)group by arrival_date
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...