Saving report as jpg

G

Guest

I have a report that I need to save as a jpg/gif/image file. This report
consists of a chart. I exported the report as snp file before but we cannot
insert it in PowerPoint. Later I used the following:
Reports!rptWithGraph!Graph1.Object.Export Filename:="C:\MyChart1.jpg",
FilterName:="jpeg"
but it only saved the chart. I have chart title in the report header. This
title changes based on user selection in the form (data from comboboxes). I
need this title to be saved also. How do I do that?

Thanks,
Lisa
 
L

Larry Linson

lwidjaya said:
I have a report that I need to save as a jpg/gif/image file. This report
consists of a chart. I exported the report as snp file before but we
cannot
insert it in PowerPoint. Later I used the following:
Reports!rptWithGraph!Graph1.Object.Export Filename:="C:\MyChart1.jpg",
FilterName:="jpeg"
but it only saved the chart. I have chart title in the report header. This
title changes based on user selection in the form (data from comboboxes).
I
need this title to be saved also. How do I do that?

I use a third-party tool (it's not free, but it's good) called Snag-It to
capture information in graphic formats. For information, see
http://www.techsmith.com/. I suspect some searching around would find some
freeware tools for screen capture, of varying quality. But, screen capture
seems to be just what you need.

Have you looked at recreating the chart in PowerPoint? I don't use the
charting features to any extent, but know there are some, and that
PowerPoint has VBA capability, too.

Larry Linson
Microsoft Access MVP
 
G

Guest

Hi Larry,
thanks for your suggestion.
Before I created the graph/report in Access, users did them in Excel and
insert the graphs in PowerPoint. Now, they want to keep all data in Access
and they want to be able to generate graphs in Access too. They also want to
present the charts in PowerPoint. I got to the point of saving the chart in
jpg, but without the title. I'm not the one who prepares the power point so I
don't think they want to have VBA coding in their presentation. :)

Lisa
 
G

Guest

Can we replace "Graph1" in the following code with parts of the report (i.e.
page header, report header, etc.)?

Reports!rptWithGraph!Graph1.Object.Export Filename:="C:\MyChart1.jpg",
FilterName:="jpeg
 
L

Larry Linson

lwidjaya said:
Can we replace "Graph1" in the following code
with parts of the report (i.e. page header, report
header, etc.)?

Reports!rptWithGraph!Graph1.Object.Export
Filename:="C:\MyChart1.jpg", FilterName:="jpeg

I'm hoping someone else can give you a definitive answer, because I haven't
done that and just don't know. My guess would be "no", that _parts_ of the
report only have meaning _within_ the report, but I certainly could be
wrong.

Larry Linson
Microsoft Access MVP
 
G

Guest

Hi Larry,
Thanks for your reply. I have another question. When I closed the report
after saving it as jpg, I got these messages:
"The operation on the Chart object failed. The OLE server may not be
registered.
To register the OLE server, reinstall it." I did what article 287022 says
and it worked for form. But when I applied it to the report, it gave me:
Run-time error '2793': Microsoft Office Access can't perform the operation
specified in the Action Property of the Visual Basic procedure you're trying
to run.

and the process stopped at this line:
Reports!rptWithGraph!Graph1.Action = acOLEClose

So, my question is: does acOLEClose only apply to forms?

Thanks in advance.
 
L

Larry Linson

As I said, I am hoping someone with the proper experience will jump in and
assist you, because I haven't worked in this area. Sorry.

Larry
 
S

Stephen Lebans

The OLE object is constrained on a report versus a form. The main point is
that you cannot open and edit the object from the report interface. Reports
are static from a UI perspective. You are trying to issue a command to close
the user interface to the Graph object when it was never opened to its UI in
the first place.

Save your report to PDF format. Most PDF readers allow you to save the
document to TIFF or JPG formats. If you need to do this programmatically
some fairly complex programming would be required.
I'll look at adding this feature to the ReportToPDF solution on my site
during the summer update.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top