Jump to content

Filter date between start date and end date


animeshsaurabh

Recommended Posts

Hi All,

I have extract date from google analytics api through java.

I have create report to display date in ireport and deploy in jasperserver and also take two date prompt i.e. start date and end date.

But i have facing problem how to filter date between start date and end date?

Suppose i am take stat date(MM/dd/yyyy) 03/01/2010 and end date(MM/dd/yyyy)  03/16/2010, the date comes to display between these start date and end date.

Plz reply asap.

 

Warm Regard

Animesh Saurabh

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I was not able to understand whats the issue exactly.

If you are having the Parameter Prompts as Start Date and End Date then in the Report Query you can add this condition in Where Clause.(... where.....and <date Column anme> between $P{Start_Date} and $p{End_Date}. )

Are you looking for all the Dates between these two dates from DUAL table or any other table?

Link to comment
Share on other sites

  • 7 months later...

Hi,

I have a similar requirement to create a start and end date tab and when a particular date is selected specific details under that date should be displayed. Can you give a step by step method of doing this ,if possible wiyh jsp/servlet. I understand that you have also done something similar.

Kindly reply

 Thanks

Anushka 



Post Edited by anushka at 12/13/2010 09:46
Link to comment
Share on other sites

Hi Sugita,

Start date and end date are two parameters on ireport and when this jrxml is put on the server these should be also passed as a input control .Yes these are  on two different prompts.

I have created a table in my database with 3 columns .Among which start_date is one of the columns.We are filtering the data from the table based on the start date and end date.we were able to achieve this by putting this query

select * from testdata where telephone_no=$P{telephone_no}
and start_date between $P{start_date} and $P{end_date} ;

Now we have to implement the same thing on our own interface and not on jasper server,i.e when we enter the start date and end date and submit it ,the report should display a portion of the report based on the dates given.This requires html,jsp and servlets please help me with the code.

Thanks

Anushka

 

 

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