Query preview works; report generation fails [message #1698144] |
Thu, 11 June 2015 10:51  |
Eclipse User |
|
|
|
I have a report query pulling data from two tables that: works in MS SQL Management Studio with no errors, and when copied and pasted into the Query window in BIRT works with a resulting Preview window as expected. However, the moment I hit View (in HTML or PDF, my two preferred outputs), I get an error message stating that the Report viewer cannot convert:
"Can not convert the value of None to Integer type."
I am sure this refers to the following query code:
,CAST(CASE
WHEN a.Access1 > 1 THEN u.o_name03
WHEN a.Access1 = 0 THEN 'None' END as varchar(10)) as 'Event'
Where I cast the value of field access1 (tinyint) to a varchar in a case statement. However, what I don't understand is that the preview runs and returns the expected text ('None') with no problems.
Why does the report generation itself cause this error - and more importantly, how do I fix it?
By the way, the above code worked, at one time, without the CAST statement (both in Preview and in the report) but I changed the data tables and re-bound the report fields (one-by-one - there are 20 of them.)
Ideas? What am I missing?
Thanks in advance.
|
|
|
|
|
|
Re: Query preview works; report generation fails [message #1699826 is a reply to message #1699796] |
Fri, 26 June 2015 18:01  |
Eclipse User |
|
|
|
Jesse,
Thanks for the question. You caught it! I somehow (probably working too late, too long) managed to place all of my fields, which in the query output are defined as strings, instead as integers on the report.
Duh! (I still do not know how I could have done that.)
Thanks for the catch - I will sleep tonight.
|
|
|
Powered by
FUDForum. Page generated in 0.03371 seconds