Jump to content
Changes to the Jaspersoft community edition download ×

Problem with query in ireport1.2.3


2006 IR Open Dicussion

Recommended Posts

By: Param - pankaj_vaksh

Problem with query in ireport1.2.3

2006-06-26 02:34

Hello friends,

I m using ireport1.2.3. I put this query in the report. When I run this query in toad by replacing startdate with a any date like 22/02/2006 query is running fine but when I put this query in the ireport file it gives me an error stating that not a group by expression. When I tried to print the startdate value in ireport file it is printing that fine. I don’t think that it is problem with the query. Can anybody help me out

 

SELECT

TRUNC(ADD_MONTHS(TO_DATE('01/' || TO_CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy'), FLOOR(MONTHS_BETWEEN(statdate,TO_DATE('01/'|| TO_CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy') ) ) ),'mm') DATES,

SUM(calls) COUNT

FROM

Table1

WHERE

statdate >= TO_DATE('01/'||TO_CHAR(TO_DATE($P{startdate}, 'dd/mm/yyyy'), 'mm/yyyy'),'dd/mm/yyyy') AND

statdate <= ADD_MONTHS(TO_DATE('01/'||TO_CHAR(TO_DATE($P{startdate}, 'dd/mm/yyyy'), 'mm/yyyy'),'dd/mm/yyyy'), 06)

GROUP BY

TRUNC(ADD_MONTHS(TO_DATE('01/' || TO_CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy'), FLOOR(MONTHS_BETWEEN(statdate,TO_DATE('01/'|| TO_CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy') ) ) ),'mm')

ORDER BY

TRUNC(ADD_MONTHS(TO_DATE('01/' || CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy'), FLOOR(MONTHS_BETWEEN(statdate,TO_DATE('01/'|| TO_CHAR(TO_DATE($P{startdate},'dd/mm/yyyy'),'mm/yyyy'),'dd/mm/yyyy') ) ) ),'mm') ASC

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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