Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Print Report directly Post Reply Post New Topic
Author Message
abhi81
Newbie
Newbie


Joined: 11 Jan 2007
Location: Canada
Online Status: Offline
Posts: 38
Quote abhi81 Replybullet Topic: Print Report directly
    Posted: 26 Jan 2007 at 11:10am
How can i print report to directly to the printer from an asp page?
I am using crystal reports 11. My application is done in asp.net and the crystal report was created in the designer and added to the application.

I am calling the report using a asp page.
IP IP Logged
abhi81
Newbie
Newbie


Joined: 11 Jan 2007
Location: Canada
Online Status: Offline
Posts: 38
Quote abhi81 Replybullet Posted: 29 Jan 2007 at 11:15am
Hello All,
The problem was solved.
Use CRViewer.PrintReport and put in place the following subroutines:
Sub CRViewer_DownloadFinished(byval downloadType)
 if downloadType = 1 and PageOne then 
 PageOne = False
 timer = window.settimeout("OnMyTimeOut",1000)
 end if
end sub

Sub OnMyTimeOut()
if not CRViewer.IsBusy then
 window.ClearTimeout(timer)
 CRViewer.PrintReport
 printerTimer = window.SetTimeOut("OnPrinterTimeOut", 1000)
 end if
end sub

Sub OnPrinterTimeOut()
 if not CRViewer.IsBusy then
  window.ClearTimeOut(printerTimer) 
  window.History.Back
 end if
end sub
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.