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

Crystal 8 - printing reports automatically

Status
Not open for further replies.

RRY

Programmer
May 27, 2002
4
US

We have recently upgraded from Info Desktop 7.0 to CE 8.0 . Requirement is to schedule a report and print the report automatically without viewing the report as overnight jobs. Crystal 8 server is on NT Server on a different domain.
1. How can I specify the path where the report is on the server.
2. Which instance of the report will it print.
3. In what format will it print.
4. How do we specify the name of the printer and the number of copies.
5. Can we write a CSP to do so.
6. Do we have to log on to the server.

Please advise on how to schedule and print a report automatically as an overnight job...RRY
 
This can only be done with custom coding within enterprise. You should have been advised to stay with Seagate Info until Enterprise 8.5 is released.
You have 3 options -
1) go back to SI until 8.5 of Enterprise is released.
2) Do custom coding in Enterprise - could be expensive if you don't have the skills internally.
3) Go without until Enterprise 8.5 is released.

It should have been made clear before you bought Enterprise that the full Info functionality is not available yet. Andrew Baines
Chase International
 
Can you elaborate on custom coding. Do you have any sample code that can be reused.I did come across some ASPs
but am not sure if I can use this code.If I can use this code to customize the requirement, then the questions asked earlier apply ...Thanks for your valuable input.

<%@ Language=VBScript %>
<%
'***************
'A simple example to show how to print a report to the web server printer
'Developed with Crystal Reports version 8
'
'See the other ASP samples from ASPXMPS8.EXE on Seagate's web site
'to see how to do other things like logon to a datasource, set parameter
'values, etc.
'***************
Option Explicit

Response.Expires = 0

If Not IsObject (session(&quot;oApp&quot;)) Then
Set session(&quot;oApp&quot;) = Server.CreateObject(&quot;CrystalRuntime.Application&quot;)
End If

If IsObject(session(&quot;oRpt&quot;)) then
Set session(&quot;oRpt&quot;) = nothing
End if

'*********Put your report file name in here
Set Session(&quot;oRpt&quot;) = Session(&quot;oApp&quot;).OpenReport(&quot;c:\inetpub\session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False
session(&quot;oRpt&quot;).EnableParameterPrompting = False

On Error Resume Next
session(&quot;oRpt&quot;).ReadRecords
If Err.Number <> 0 Then
Response.Write &quot;Error &quot; & Err.Number & &quot;: &quot; & Err.Description & &quot; has occured reading records.&quot;
Else
If IsObject(session(&quot;oPageEngine&quot;)) Then
set session(&quot;oPageEngine&quot;) = nothing
End If
set session(&quot;oPageEngine&quot;) = session(&quot;oRpt&quot;).PageEngine
End If

'Response.Redirect(&quot;rptserver.asp&quot;) 'This is to view the report

'*********Print a test page on your printer to get this information
session(&quot;oRpt&quot;).SelectPrinter &quot;PSCRIPT.DLL&quot;,&quot;V7-4MP-TS2&quot;,&quot;V7-4MP-TS2&quot;
If Err.Number <> 0 Then response.write &quot;oRpt SelectPrinter failed with error [&quot; & Err.Number & &quot;: &quot; & Err.Description & &quot;]<br>&quot; end if

'Print the report.
'session(&quot;oRpt&quot;).PrintOut False,1,False,1,2
session(&quot;oRpt&quot;).PrintOut False 'This will print out the report (other parameters default)
If Err.Number <> 0 Then
response.write &quot;oRpt Printout failed with error [&quot; & Err.Number
response.write &quot;: &quot; & Err.Description & &quot;]<br>&quot;
end if
%>
<html>
Report print attempt completed.
</html>
 
Andrew --

I need to create reports that can be run from a desktop icon or automated via the Windows Task Scheduler. Icon-triggered reports may have a parameter request of the user, but other than that we need to shield users from Crystal Reports internals.

I understood that I needed Crystal Info to do that and that it was on the Crystal Reports (8.5) CD -- but I can't find it there.

Can you help me get oriented? TIA!
Bill
 
Crystal Enterprise Std only does web viewing of reports.

If you need scheduling to print or email report you need a 3rd party scheduler like my cViewMANAGER. Ken Hamady has a list solutions in one of his earlier newsletters. Editor and Publisher of Crystal Clear
 
Hello, I need some help, please, it´s very important, I´ve read the code for the use of printer in ASP with crystal reports, I have a problem with the dll of my printer:

Error 424: Object requiredoRpt SelectPrinter failed with error [424: Object required]
oRpt Printout failed with error [424: Object required]

I think the problem is with selectprinter, I get information with test page but there is 5 dll´s, please help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top