Jump to content
Changes to the Jaspersoft community edition download ×

Problem while reading fields


ktrinad

Recommended Posts

By: T.Gopalakrishnan - tgopal

Problem while reading fields

2003-11-12 02:57

He is the query I used in the 'Report Query' to read fields.it works fine

 

SELECT CLOSING_BALANCE

FROM CURRENCIES T ,CURRENCY_STOCKS

WHERE (T.NAME=CURRENCY_STOCKS.CURR_NAME(+))

AND NVL(CURRENCY_STOCKS.STOCK_DATE,SYSDATE)=

(SELECT NVL(MAX(STOCK_DATE),SYSDATE) FROM CURRENCY_STOCKS

WHERE CURR_NAME = T.NAME

AND STOCK_DATE<=SYSDATE )

 

But I need to use an parameter value instead of the 'SYSDATE'.so I created an parameter field called 'SDATE' and I changed the query as following and I tried to read fields with the follwing query it throws an SQL exception due to that SDATE(parameter value)

 

SELECT CLOSING_BALANCE

FROM CURRENCIES T ,CURRENCY_STOCKS

WHERE (T.NAME=CURRENCY_STOCKS.CURR_NAME(+))

AND NVL(CURRENCY_STOCKS.STOCK_DATE,$P{SDATE})=

(SELECT NVL(MAX(STOCK_DATE),$P{SDATE}) FROM CURRENCY_STOCKS

WHERE CURR_NAME = T.NAME

AND STOCK_DATE<=$P{SDATE} )

 

 

Can any one help how to resolve this

 

Thanks and Regards

T.Gopalakrishnan

 

 

 

 

 

By: Sachin Aggarwal - sk_aggarwal

RE: Problem while reading fields

2003-11-12 03:06

Hi

Try using something like this in ur query

TO_DATE('$P!{ToDate}','DD-MM-YYYY')

note ! after P.

delare a parameter ToDate of type Striing and pass ur date as string in required format.

hope it works for u

sachin

 

 

 

 

By: Karthik - karthik_ji

How to make a total/sum of the column

2003-11-12 06:09

Hi all,

 

Im using iReports to generate a report. Im using JDBC connection datasource. In the reports I list 4 columns using a query. I want to add all the values in the "column1" and display it as a "Total". Can anybody suggest me how to do this.

 

Thanks

Karthik.G

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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