Skip to main content



      Home
Home » Archived » BIRT » Question about Conditional Elements (2.0 M3)
Question about Conditional Elements (2.0 M3) [message #99313] Wed, 14 December 2005 18:55 Go to next message
Eclipse UserFriend
Originally posted by: pcasey.earthlink.net

I have a data set which (yes, I know this is bad database design, but I
inheritted it) has a single column "response" in which either the string
represenation of a number, a true string, or a date will be stored.

For a given set of responses e.g. all responses to question "What is
your name?" we have the same data type.
What is your name -> Strings
What is your age (years) -> numbers, but stored in a varchar(50) column

I'd like my report to display some basic statistics for the case where
the responses are type castable as numbers. Birt can actually do this just
fine and if, for example, I load a report with a data set that contains only
"castable" strings, all is well. I can't guarantee that, in production, the
question will contain this kind of pseudo-string data.

So I'd like to make the display of the stats fields conditional e.g.
they only show up if the data is numeric castable. There's actually a field
I can interrogate to determine this, so generating the visibility condition
is trivial.

*but* (there's always a but)

When BIRT runs the report, even if I set the visibility condition to
"false", it still seems to be evaluating the fields and, naturally, it
throws errors and my report gets narfed.

So my question is, how can I tell BIRT to not only not *display* a field
based on a conditional expression, but to flat out not *calculate* it in the
first place?

Can I even do this?

Thanks,

--- Pat
Re: Question about Conditional Elements (2.0 M3) [message #101214 is a reply to message #99313] Wed, 21 December 2005 12:27 Go to previous message
Eclipse UserFriend
Patrick,

Without making code changes to the source, I dont see a way of doing this.
That doesnt mean it cant be done. I may be blind :>
Any chance you can add a Stored Proc to do the culling?

Jason Weathersby
BIRT PMC

"Patrick Casey" <pcasey@earthlink.net> wrote in message
news:dnqbd7$89p$1@news.eclipse.org...
>
> I have a data set which (yes, I know this is bad database design, but I
> inheritted it) has a single column "response" in which either the string
> represenation of a number, a true string, or a date will be stored.
>
> For a given set of responses e.g. all responses to question "What is
> your name?" we have the same data type.
> What is your name -> Strings
> What is your age (years) -> numbers, but stored in a varchar(50) column
>
> I'd like my report to display some basic statistics for the case where
> the responses are type castable as numbers. Birt can actually do this just
> fine and if, for example, I load a report with a data set that contains
> only "castable" strings, all is well. I can't guarantee that, in
> production, the question will contain this kind of pseudo-string data.
>
> So I'd like to make the display of the stats fields conditional e.g.
> they only show up if the data is numeric castable. There's actually a
> field I can interrogate to determine this, so generating the visibility
> condition is trivial.
>
> *but* (there's always a but)
>
> When BIRT runs the report, even if I set the visibility condition to
> "false", it still seems to be evaluating the fields and, naturally, it
> throws errors and my report gets narfed.
>
> So my question is, how can I tell BIRT to not only not *display* a
> field based on a conditional expression, but to flat out not *calculate*
> it in the first place?
>
> Can I even do this?
>
> Thanks,
>
> --- Pat
>
Previous Topic:HOW TO
Next Topic:Supress Duplicates
Goto Forum:
  


Current Time: Wed Mar 12 00:18:15 EDT 2025

Powered by FUDForum. Page generated in 0.04244 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top