Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
how to integrate boolean field in Birt report
Rajesh Kakawat
I want to know Can I integrate Boolean field in report?.
Because when I am integrating boolean field I am getting error which as follow
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Adapter
Plug-in ID:org.eclipse.birt.report.data.adapter
Version:2.5.2.v20100208
Error Code:exception.error
Error Message:An exception occurred during processing. Please see the following message for details:
Failed to prepare the query execution for the data set: CaseList
Failed to prepare the following query for the data set type (org.jboss.tools.birt.oda.dataSet).
[select cases.caseNo,
cases.name,
doctor.firstName,
patient.firstName,
disease.name,
medicine.name,
service.name,
serviceTest.name,
staff.firstName,
cases.status,
cases.visitDate,
cases.fatherOrHusbandName,
cases.nextVisit
from Cases as cases
where cases.ownerCode = ?
]
'boolean' is not a valid type.
nextVisit is my boolean field
Any solution ???
Thanks
Find more posts tagged with
Comments
Megha Nidhi Dahal
Rajesh,<br />
<br />
As per my understanding, the problem is with the way the data is stored in db. If nextVisit is stored as 'true'/'Y' or 'false'/'N' then it is a character sequence, it cannot be boolean. Try changing the type of nextVisit to boolean in your dataSet. However if you need a boolean equivalent, you can compare the nextVisit value and store in some other computed column.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if( dataSet["nextVisit"] == "true" )
dataSet["nextVisitBool"] = true;
else
dataSet["nextVisitBool"] = false
</pre>
<br />
regards<br />
Arpan
Rajesh Kakawat
Thanks for reply,
Actually , I have used Hibernate with birt report and I am using Microsoft Sql server 2005 for database .
"nextVisit" field is bit type in my Database and Boolean in my Hibernate .
when I validate my query then it is not showing error,but when I press ok then
Only Dataset is showing all field are gone
When I remove "nextVisit" field then my report is working correctly
So what is going wrong with the field???
Thanks
Megha Nidhi Dahal
Rajesh,
Please try changing the type of nextVisit to string in the dataSet and check.
Also ignore my previous reply where, by mistake I have asked you to change the type to boolean.
regards
Arpan