Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Sign up

Sign up | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Fetch method to retrieve result from calculation in sql script
Fetch method unable to return the row
October 22, 2014
6:45 pm
Avatar
Albert Tjiptabudy
New Member
Members
Forum Posts: 2
Member Since:
October 22, 2014
sp_UserOfflineSmall Offline

Hi All,

I have an oracle sql script that return records from work order table. For each record, the sql script is also calculating the number of days between work order status changed date and actfinish. here is the code in the select statement:

extract(day from (wo.actfinish - wos1.changedate) day to second ) dur_wapprtoactfinish

the wos1 table is a left join to the workorder table:

" left join "

+ " wostatus wos1 "

+ " on wo.wonum = wos1.wonum "

+ " and wos1.status = 'WAPPR'

Those lines are inserted in the open method as part of sql query. The following is the fetch method for the relevant column:

row["wapprtoactfinish"] = maximoDataset.getString("dur_wapprtoactfinish")

 

In the Data Sets, if the line in the fetch method is excluded the preview results returns a record (working in a dev database so I'm unit testing the report). However, it won't return any result if  I wish to output the calculation column into the report.

I'm not quite understand why the fetch method not returning the result. I have also tried to use .getInteger or .getDecimal which have not had any luck.

Any suggestion is appreciated.

 

Thanks,

Albert

October 27, 2014
12:52 pm
Avatar
Chon
Stoneham, MA USA
Admin
Forum Posts: 1090
Member Since:
March 2, 2009
sp_UserOfflineSmall Offline

Hello, Please register to see the Admin's answer!

October 28, 2014
9:11 pm
Avatar
Albert Tjiptabudy
New Member
Members
Forum Posts: 2
Member Since:
October 22, 2014
sp_UserOfflineSmall Offline

Hi

Manage to get the report working and displaying the correct information.

Yes the "wapprtoactfinish" is defined in the datasetobject. Thanks for responding.

Forum Timezone: America/New_York

Most Users Ever Online: 54

Currently Online:
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

sun kim: 60

madd0g17: 59

v.barsamov: 51

Maximofresher: 44

cgregory: 42

matta0990: 33

Member Stats:

Guest Posters: 0

Members: 13577

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 8

Topics: 1528

Posts: 4195

Newest Members:

yoga bagus, CoET.bobo, sopra sopra, Tamizan Alibhai, Alan Drake, Ibrahim Abdalla

Administrators: Chon: 1090, kristensibilia: 0, Joe Grassia: 0