Sorry if this is long. I am trying to create a "Top 5" chart in an application. My SQL query is:
select null, location, tickets
(select d.location_name as location, count(*) as tickets
from job_ticket@WHD a,
where a.assigned_tech_id = c.client_id
AND a.CLIENT_ID = b.CLIENT_ID
and b.location_id = d.location_id
and a.report_date > sysdate - 7
group by d.location_name
order by tickets desc)
where rownum < 6
If I choose a Flash chart I receive "XML Parser failure: unterminated attribute", for an HTML5 chart just a blank page. However, if I take the result data and do something like this the chart works:
select null,'Data Services',13
select null,'Helpdesk - Staff',6
I even tried to create a table from the the query and still experience the same issue. Any thoughts?
I have a stats page which builds its chart dynamically, date ranges can be entered as parameters along with All Offices or an individual office.
The source of the chart is a pl/sql package function returning VARCHAR2
Series Name - Series 1
Query - RETURN my_stats_pkg.my_chart_sql;
You then build the SQL in the PL/SQL, I return something similar to the following
, MAX(DECODE(ao.area_office_id,1,s.lpid_count,0)) Ayr ,MAX(DECODE(ao.area_office_id,2,s.lpid_count,0)) series1
,MAX(DECODE(ao.area_office_id,3,s.lpid_count,0)) Dumfries ,MAX(DECODE(ao.area_office_id,4,s.lpid_count,0)) series2
,MAX(DECODE(ao.area_office_id,5,s.lpid_count,0)) Galashiels ,MAX(DECODE(ao.area_office_id,6,s.lpid_count,0)) series3
,MAX(DECODE(ao.area_office_id,7,s.lpid_count,0)) Hamilton ,MAX(DECODE(ao.area_office_id,8,s.lpid_count,0)) series4
FROM lpis_statistic s
WHERE s.wh_control_id = wc.wh_control_id
AND s.area_office_id = ao.area_office_id
AND s.measurement_id = m.measurement_id
AND m.measurement_num = 2
AND wc.wh_day = 1
GROUP BY wc.wh_date
ORDER BY wc.wh_date
Interesting find this morning. If I change the query and do 'select SUBSTR(d.location_name,1,1) as location...' a chart shows up. Anything beyond 1 character, I receive the error or a blank chart. I remained stumped.
When you run the page with Debug set to "Yes", and click on the "Show XML" link under your chart, what information do you see when you click the link? If there are no issues, generally you should expect to see the complete XML for your chart. However, if an error is reported during the rendering, it should be captured there.
Would you mind putting a testcase up on apex.oracle.com, and updating this thread with the necessary login credentials, so that I can take a closer look?