Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a report to HTML to use within a web page

Status
Not open for further replies.

unclejimbob

Technical User
Oct 12, 2005
128
AU
Hello, I have a problem with using BOE XI to export a report to HTML. The situation is that the report's output
is designed to be embedded within a web page generated on the fly along with information derived from other sources.

I use ASP scripts to give the required functionality.

The issue is that it used to work under CE 8.5 but doesn't work under BOE XI.

The HTML report output is generated by issuing this pretty standard URI (please assume the apstoken information exists):


or its equivalent


'fullreporturl' simply contains a wrapper URL that winds up generating the above URL, it contains a form that is POSTed by the call below.

The output is then streamed into a variable 'reporthtml'

set xmlhttp = server.createobject("Msxml2.ServerXMLHTTP.4.0")
xmlhttp.setTimeouts lResolve, lConnect, lSend, lReceive
xmlhttp.open "POST", fullreporturl, False
xmlhttp.send
reporthtml = xmlhttp.responsetext

Now if I use export formats U2FXLS:3 or U2FPDF:0 there is no problem (obviously I get weird characters in the output as the web browser tries to render the resulting PDF as HTML but at least it doesn't fail), when I use U2FHTML:2 I get this error...

Export format 'U2FHTML' is not supported.

The list of valid export formats is given in:


I've had a look around the tektips forums and can't find a solution - although there are a number of similar questions.

Question: how can I (easily) export and stream HTML from a report without having to resort to things like processhttprequest ?

Ideally I would like to still simply be able to use a URI to generate the required HTML.

What (if any) are my options ?

thanks
ujb
 
Figured out the answer, quite simple solution really in the end.

First of all changed the export format to PDF thus:


Then stopped the URL from being POSTed - otherwise all you get is a raw PDF stream embedded in the web page.

Then wrapped the result in an iframe tag.

Assuming that the above export URL is contained in a variable ReportURL then...

theResponse = "<iframe src="&""""&ReportURL&""""&" style="&""""&"width: 100%; height: 480px;"&""""&"></iframe>"

response.write theResponse

Initially I was going to go with an embedded HTMLViewer control but while nice looking it meant that the whole report couldn't be viewed at one go.

Now I have a report's output embedded in my web page and I can still use the standard URI path approach to generate it. Cool.

ujb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top