Home » Archived » BIRT » Chart engine unable to handle charts with parameters
Chart engine unable to handle charts with parameters [message #111414] |
Thu, 19 January 2006 05:39  |
Eclipse User |
|
|
|
Originally posted by: maspeli.deloitte.co.uk
Hi,
I have a query that returns three columns: A Name, a Count and a
Classification. I want to display a stacked bar chart, showing a breakdown
of Count by Classification for each name (so x-axis = Name, y-axis = Count,
y-axis grouping = Classification). The query takes a single parameter, a
TestDate.
I'm having two problems with this.
The first one is that once I assign the parameter (so map param 1 to
params["TestDate"]) Birt starts spewing exceptions at me, telling me that
params is not defined. This generally used to work fine at run time but not
at design time. However, as of 2.0RC1, when this exception starts occuring,
BIRT is no longer saving any changes to my chart. That is, I change some
settings (i.e. the parameter assignment, but also things like where the
labels are positioned and turning on gridliens), click Finish, run the
report, and BIRT is ignorant of any of my changes. When I return to the
chart, the old settings are still there. This basically renders the charting
engine useless when I need the chart query to be parameterised, because I
can't set that parameter in the first place!
Secondly, from M3 I had a chart that used to come up with the exception, but
that actually ran the report. However, there are about 17 different Names
being returned at the present time. Because the chart is not so big in the
designer, BIRT starts grouping the labels for this chart (I have flipped it
so it's horizontal rather than vertical), which makes it confusing since
each value for Name (the x-axis) is a discrete value. Is there some option
I'm missing? I tried a few, but because of the bug above, I can't be sure if
my changes actually changed anything!
Martin
|
|
|
Re: Chart engine unable to handle charts with parameters [message #111509 is a reply to message #111414] |
Thu, 19 January 2006 07:06   |
Eclipse User |
|
|
|
Originally posted by: maspeli.deloitte.co.uk
> The first one is that once I assign the parameter (so map param 1 to
> params["TestDate"]) Birt starts spewing exceptions at me, telling me that
> params is not defined. This generally used to work fine at run time but
not
> at design time. However, as of 2.0RC1, when this exception starts
occuring,
> BIRT is no longer saving any changes to my chart. That is, I change some
> settings (i.e. the parameter assignment, but also things like where the
> labels are positioned and turning on gridliens), click Finish, run the
> report, and BIRT is ignorant of any of my changes. When I return to the
> chart, the old settings are still there. This basically renders the
charting
> engine useless when I need the chart query to be parameterised, because I
> can't set that parameter in the first place!
So, here's what I currently do:
If I use a Date Parameter, I get an error saying that metaData.data and/or
data.data don't exist. So,
- I make my query take a String parameter with a default value '2006-01-01'
(which to SQL is also a date).
- Then I edit my chart, setting the options I want
- Then I go to the parameters screen in the chart and set a string value for
the parameter, '2006-01-02'
- Then I go back to the query, change it back to a DateTime parameter with
default value new Date()
- Then I edit the XML source, replacing '2006-01-01' in the parameter
definition for the chart, with param["TestDate"]
And then if I want to change anything else in the chart, I have to repeat
the entire process or change the XML only.
Hardly ideal :)
Martin
|
|
|
Re: Chart engine unable to handle charts with parameters [message #111581 is a reply to message #111414] |
Thu, 19 January 2006 07:51   |
Eclipse User |
|
|
|
Did you try with RC2? I think we fixed the exceptions problem. You will see
the exception only once now.
What happens is that at design time, params is not defined, so we can't
evaluate it, the chart builder warns you once (we have no way currently of
identifying this particular error, we'll do that in a future release), and
then reverts to non-live data.
What do you mean by "grouping the labels"? If some labels disappear because
there is no space for all of them, there are several solutions:
- Stagger the labels
- Change the orientation of labels
Thanks,
David
"Martin Aspeli" <maspeli@deloitte.co.uk> wrote in message
news:dqnq8h$kdq$1@utils.eclipse.org...
> Hi,
>
> I have a query that returns three columns: A Name, a Count and a
> Classification. I want to display a stacked bar chart, showing a breakdown
> of Count by Classification for each name (so x-axis = Name, y-axis =
> Count,
> y-axis grouping = Classification). The query takes a single parameter, a
> TestDate.
>
> I'm having two problems with this.
>
> The first one is that once I assign the parameter (so map param 1 to
> params["TestDate"]) Birt starts spewing exceptions at me, telling me that
> params is not defined. This generally used to work fine at run time but
> not
> at design time. However, as of 2.0RC1, when this exception starts
> occuring,
> BIRT is no longer saving any changes to my chart. That is, I change some
> settings (i.e. the parameter assignment, but also things like where the
> labels are positioned and turning on gridliens), click Finish, run the
> report, and BIRT is ignorant of any of my changes. When I return to the
> chart, the old settings are still there. This basically renders the
> charting
> engine useless when I need the chart query to be parameterised, because I
> can't set that parameter in the first place!
>
> Secondly, from M3 I had a chart that used to come up with the exception,
> but
> that actually ran the report. However, there are about 17 different Names
> being returned at the present time. Because the chart is not so big in the
> designer, BIRT starts grouping the labels for this chart (I have flipped
> it
> so it's horizontal rather than vertical), which makes it confusing since
> each value for Name (the x-axis) is a discrete value. Is there some option
> I'm missing? I tried a few, but because of the bug above, I can't be sure
> if
> my changes actually changed anything!
>
> Martin
>
>
|
|
|
Re: Chart engine unable to handle charts with parameters [message #111590 is a reply to message #111509] |
Thu, 19 January 2006 07:52   |
Eclipse User |
|
|
|
Please let us know quickly if RC2 didn't fix the issue.
Thanks,
David
"Martin Aspeli" <maspeli@deloitte.co.uk> wrote in message
news:dqnvbc$t7k$1@utils.eclipse.org...
>> The first one is that once I assign the parameter (so map param 1 to
>> params["TestDate"]) Birt starts spewing exceptions at me, telling me that
>> params is not defined. This generally used to work fine at run time but
> not
>> at design time. However, as of 2.0RC1, when this exception starts
> occuring,
>> BIRT is no longer saving any changes to my chart. That is, I change some
>> settings (i.e. the parameter assignment, but also things like where the
>> labels are positioned and turning on gridliens), click Finish, run the
>> report, and BIRT is ignorant of any of my changes. When I return to the
>> chart, the old settings are still there. This basically renders the
> charting
>> engine useless when I need the chart query to be parameterised, because I
>> can't set that parameter in the first place!
>
> So, here's what I currently do:
>
> If I use a Date Parameter, I get an error saying that metaData.data and/or
> data.data don't exist. So,
>
> - I make my query take a String parameter with a default value
> '2006-01-01'
> (which to SQL is also a date).
> - Then I edit my chart, setting the options I want
> - Then I go to the parameters screen in the chart and set a string value
> for
> the parameter, '2006-01-02'
> - Then I go back to the query, change it back to a DateTime parameter with
> default value new Date()
> - Then I edit the XML source, replacing '2006-01-01' in the parameter
> definition for the chart, with param["TestDate"]
>
> And then if I want to change anything else in the chart, I have to repeat
> the entire process or change the XML only.
>
> Hardly ideal :)
>
> Martin
>
>
|
|
|
Re: Chart engine unable to handle charts with parameters [message #111613 is a reply to message #111581] |
Thu, 19 January 2006 09:00   |
Eclipse User |
|
|
|
Originally posted by: maspeli.deloitte.co.uk
> Did you try with RC2? I think we fixed the exceptions problem. You will
see
> the exception only once now.
No, I'm about to do that now, in fact. Will let you know.
Does your fix cause the chart viewer to properly *save* chart options even
when you get an exception because of a missing params? Basically, the
behaviour I'm seeing is that if I get that exception, subsequent changes in
chart properties don't persist when I click Finish.
> What happens is that at design time, params is not defined, so we can't
> evaluate it, the chart builder warns you once (we have no way currently of
> identifying this particular error, we'll do that in a future release), and
> then reverts to non-live data.
Why can't you just build a fake params map, that simply uses the default
values specified in the parameter collection?
> What do you mean by "grouping the labels"? If some labels disappear
because
> there is no space for all of them, there are several solutions:
> - Stagger the labels
> - Change the orientation of labels
Yeah, that's it. I got there in the end, the problem was the fact that
changes didn't persist as described above, and it was confusing me. :)
Martin
|
|
| | |
Re: Chart engine unable to handle charts with parameters [message #111687 is a reply to message #111613] |
Thu, 19 January 2006 11:55  |
Eclipse User |
|
|
|
> Why can't you just build a fake params map, that simply uses the default
> values specified in the parameter collection?
What if a parameter doesn't have a default value? The issue is not limited
to parameters, it's only one of the runtime expressions that fail. Please
take a look at this bug 122864 , you can input some suggestions if you like.
Thanks,
David
|
|
|
Goto Forum:
Current Time: Thu Jul 17 22:25:44 EDT 2025
Powered by FUDForum. Page generated in 0.33501 seconds
|