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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Html Export/Print button? Supported

Status
Not open for further replies.

redsand23

Technical User
Feb 22, 2002
77
US
Hello all,
I am new to the web reporting, I have a quick question. Does the HTML viewer support exporting and printing.
I put these into the reportpageviewer.asp

.HasPrintButton = true
.HasExportButton = true

And did not receive an error but did not get the print/export functionality to work.

I know I could use the activex and get it to work, I am using a frames page and I like the clean look of the html page.
Any help would be greatly appreciated!!!
 
Please post the product and version that you're using...

Crystal Enterprise will supply an envelope icon in the default DHTML viewer, I'm not familiar with an HTML viewer.

With DHTML, the printing is controlled by the browser, though there are secondary steps which can help with this such as exporting to PDF and printing from that, but this is dependent upon your version of CE.

Or perhaps you've used RAS, or made calls using ASP, or through the Java Api, or...in which case things might be different.

Consider posting the equivalent to calling a help line, the first thing they will ask is what product you're using, and what version.

-k
 
That makes a lot of sense... Here we go.
I am running crystal reports 9 with ras - eportoflio lite.

I have an asp page that has the following code in it

Dim objFactory 'Use the ObjectFactory object to abstract the version number to one location
Set objFactory = CreateObject("CrystalReports.ObjectFactory.2")

Const REPORTSOURCEPARAM = "reportsource"
Const CRREPORTSOURCE = "CrystalReportReportSource"

'Create a reference to the tables collection of the main report

Sub OutputReport()
' DESCRIPTION : Use the web report viewer to view the report specified by the "reportsource"
' request parameter
Dim reportSource
Dim viewer

Dim requestMethod
requestMethod = UCase(Request.ServerVariables("REQUEST_METHOD"))

Select Case requestMethod
Case "POST"
reportSource = Request.Form(REPORTSOURCEPARAM)
Case "GET"
reportSource = Request.QueryString(REPORTSOURCEPARAM)
Case Else
reportSource = Empty
End Select

' View report
If (IsEmpty(reportSource)) Then
reportSource = Session(CRREPORTSOURCE)
End If

If Not (IsEmpty(reportSource)) Then
Session(CRREPORTSOURCE) = reportSource

Set viewer = objFactory.CreateObject("CrystalReports.CrystalReportViewer")

With viewer
.HasPrintButton = true
.HasExportButton = true
.isdisplaygrouptree=false
.ReportSource = reportSource
.IsOwnPage = false
.HasRefreshButton = false
.Name = "HTML Page Viewer"

End With

Call viewer.ProcessHttpRequest(Request, Response, Session)
End If

if Err.number <> 0 then
Response.Write Err.Description
Err.Clear
end if

Set viewer = nothing
End Sub

%>

<html>
<body bgColor="white">
<% OutputReport %>
</body>
</html>



I can not get the export or print buttons to show up on the page. The other options such as .hasrefreshbutton show up or not depending on true/false.

In some of the other posts they say to go to a .csp page but I do not have any .csp pages on the server that I have installed this on.

Where can I get an example of the dhtml page.

Thanks for being patient.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top