Skip to Main Content

Chinese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I assign color attribute for dvt:series dynamically ?

746878Mar 4 2010
I want to assign color for dvt series.

It works good if I set a static color as followed :
<dvt:series index="0" markerType="MT_BAR" color="#000084"/>

However, it doesn't work if I set the color like that:
<dvt:series index="0" markerType="MT_BAR" color="#{mybean.color}"/>

I watched some corresponding documents. They say the color attribute doesn't support el expressions.

How can I solve this problem.


Thanks !

Comments

L. Fernigrini
Answer

Please, this is not the first question you ask, follow the guidelines!!!

It is imposible to reproduce what you show in the pictures, please copy and paste CODE!!

You should consider something like:

WITH vDesiredData as (SELECT xxx, yyy, zzz FROM YourTable WHERE .....),

     vDefaultData as (SELECT  'A', 1, SYSDATE FROM DUAL)

SELECT * FROM vDesiredData

UNION ALL

SELECT * FROM vDefaultData WHERE NOT EXISTS (SELECT 1 FROM vDesiredData);

In this case if there is data that can be returned, the UNION won't add anything since the NOT EXISTS in the WHERE clause will evaluate to false.

On the other case, when there is no data on vDesiredData, the first SELECT FROM vDesiredData wont return anything but the UNION ALL will incude whatever you configured in vDefaultData

Marked as Answer by Vemula Muni · Sep 27 2020
BrunoVroman

Hello Vemula,

what default value? And maybe it depends of the reason for "no match" (for example: no such emplid but assignemnt_id and assign_sts and start_dt end_dt OK for at least 1 other emplid?... )

Or simply:

WITH your_query AS
( SELECT b.project_id, ... FROM ... WHERE ... )
SELECT NVL( b.project_id, 'your_default_value' ) project_id
  FROM dual
  LEFT OUTER JOIN your_query ON 1 = 1
;

(maybe you want something like "No such combination!" as default value?

Best regards,

Bruno Vroman.

jaramill

Yes I agree with @"L. Fernigrini" this is NOT your first post. Please follow the guidelines and also....don't leave threads unmarked answered! You have 3 of them recently where you just disappear

pastedImage_0.png

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 1 2010
Added on Mar 4 2010
0 comments
1,464 views