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

Print button on crystalreportviewer CE8.5

Status
Not open for further replies.

maverickxx

Programmer
Jul 6, 2004
6
0
0
US
Hi
Background on the system: JSP, JAva Application with CE 8.5
Print button on the crystalreportviewer dozent seem to work.
on hitting the print button it tries to get PDF copy but fails. Any suggestions Ideas. THanks in advance
 
I'm having the same issue, but only on one computer... all the rest work just fine.

Did you ever find a resolution? Does anyone else have this issue? Does anyone have any ideas to fix it?
 
I don't know why your pdf is failing but in my case we did not wanted it to go to pdf and then print we just wanted it to print directly when the print button was pressed and I added this line of code in my viewer.jsp

viewer.setPrintMode(CrPrintMode.ACTIVEX);

HTH
 
Hi,
When using that method be aware that a first time visitor to the site will need to allow the ActiveX Plug-In to be installed in their IE and they will need to be running under an account that has administrative rights to their PC..

That is why we have moved to DHTML viewers and PDF printing. The extra step to print is less annoying to our users than the 'Cannot create ActiveX object' messages and the little x

Try saving your Viewer Object in a session variable and calling it from a new page.
We set the Viewer options on this page:

Code:
Set Viewer = CreateObject("CrystalReports.CrystalReportInteractiveViewer")
With Viewer
  .reportSource = reportDocument
  .HasBooleanSearchButton = False
  .HasCrystalLogo = False
  If NbrParams > 0 then
  .ParameterFields = Fields
  End If
  .HasRefreshButton = True
  .IsDisplayGroupTree = False
  .HasPrintButton = true
  .PrintMode = 0   .IsOwnPage = true
End With

set session("viewer") = viewer

and then call this one:


Code:
<%@ Language=VBScript %>

<%
option explicit

dim viewer
set viewer = session("viewer")
'Error handle
on error resume next
Viewer.ProcessHTTPRequest Request, Response, Session

if err.number <> 0 then
  response.write "Failed to view report" & "</BR>"
  response.write "error number: " & err.number & "</BR>"
  response.write "error description: " & err.description
end if
%>


There are in VBScript and are using ASP, but something like that should be doable in JSP
[profile]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top