How Do I Get My Charts Out of a Report?

Someone asked, I have this cool report, how do I get the chart out of it? For now I’ve been taking screenshots.

So let’s look at how you can get your Report out to HTML (and a PNG.)

When I say HTML, I mean you have a SQL Dev report that’s generated by SQL Developer itself. I am NOT talking about DBMS_OUTPUT reports that you can use to physically print HTML3 code and have it render as HTML in SQL Developer.

The Report

Here’s a query I’ve used against my UNTAPPD data and turned into a not very good bar chart.

So top 15 beers I’ve tried, based on the number of times I’ve tried them. And, I wanted to know how strong they were, to see if there was any correlation. The correlation bit is hard to see via this type of chart, that’s why I say it’s not the best report for what I want to do.

Here’s the report as it renders INSIDE of SQL Developer.

Axis, labels, data, all that jazz.

So, how can I get this out of SQL Developer, besides taking a screenshot?

Well, if you export it to HTML, it will also spit out a PNG of the graph itself.

Right click…

Then, where is it going to go?

Pretty straightforward, where are we putting this file?

Ok, let’s go look at our report!

Whiz-bang?

If you look at the HTML source behind your report, you’ll see the IMG tag and the chart PNG that was created.