Home » Archived » BIRT » Question about Conditional Elements (2.0 M3)
Question about Conditional Elements (2.0 M3) [message #99313] |
Wed, 14 December 2005 23:55 |
Eclipse User |
|
|
|
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 17:27 |
|
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
>
|
|
|
Goto Forum:
Current Time: Mon Dec 30 16:32:39 GMT 2024
Powered by FUDForum. Page generated in 0.02837 seconds
|