View Single Post
  #4 (permalink)  
Old 07-01-2009, 11:19 AM
Dragunov Dragunov is online now
Junior Member
 
Join Date: Jun 2009
Posts: 14
Default

hi all,

I had found the cause of error. As i said ,this error seemed to be strange, its cause also seemed to be strange.

I was using 2 datasets joined together in a joint dataset. In each dataset i was fetching values using 2 queries ( i used a main query to fetch some result and based on that i was fetching another set of result by writing a function inside my fetch method).

All the Queries where having some column aliases.
like
select count(entered_timesheet_no) as enteredcount .
and in the fetch method i would use
row["count"]=dataSet.getInteger("enteredcount");
this was working fine when the report runs from a single data set, but when i joined the 2 datasets to create a joint data set and use that to show data in my report, this alias name in the query was the causing the problem.

it took me lot of research to find out the exact cause
i removed the aliases from query and modified all my code like

select count(entered_timesheet_no)
row["count"]=dataSet.getInteger("count(entered_timesheet_no)");
and every thing was fine.

still have no idea why the alias name was causing error.

ny way thanks for all who tried to help.
Reply With Quote