January 5, 2005 at 1:40 pm
Hi folks,
If you are using Access 2002 for front and back end solutions, what's the best way to export reports to XML format? Just need a quick answer on this one. Thanks!
All the best,
Dale
Author: An Introduction to SQL Server 2005 Management Studio
January 7, 2005 at 12:50 am
I assume you have already found a solution to this, but if you haven't then here it is:
If you are simply using the MS-Access front-end in developer mode, then you Right-Click on the report you want to export, select Export, choose XML as the file type and the folder into which you want to store the file. If you wish you can go look at the advanced options to specify if you wnat to just export the data, the schema, and images - a Cooler export you will never find!
If you are coding the export then you could use the following code. ObjectType is mandatory as is the XMl file name. If you choose to provide a file name for the PresentationTarget, then in addition to the XML data file, an XSL stylesheet file will be generated as well. The OtherFlags argument allows you to choose between htm and asp. You may also specify the images folder.
Dim sReport As String, sXML As String, sXSL As String
Dim iOutType as Integer
sReport = "repCustomerGroupingbyCountry"
sXML = "C:\MyReports\repCustGrpbyCtry.xml"
sXSL = "C:\MyReports\repCustGrpbyCtry.xsl"
iOutType = 4 ' Use 0 to export in HTMExport
ExportXML acExportReport, sReport , sXML, ,sXSL, _
, ,iOutType
Hope that helps
James
January 7, 2005 at 7:51 am
Excellent, James! That's exactly what I was looking for (the code part that is)!
All the best,
Dale
Author: An Introduction to SQL Server 2005 Management Studio
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply