p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Print directly from ASP page without going through Viewer


Message #1 by "Tony Cooper" <tony.cooper@h...> on Fri, 26 Apr 2002 16:55:22
Hi all

Hope you can help.
Using the ParameterFields.asp example in the ASP Samples that come with CR 
8.5, I've been able to pass paramters to a report and display it in a 
viewer.

I now want to extend the functionality a little and allow the user to 
print the report directly, and not go through the viewer. I can't seem to 
be able to code around the viewer.

I populate the parameters and then do the following:-

If Request.Form("output") = "Preview"
....
.... do the viewer stuff ...
Else
	 session("oRpt").PrintOut = False
	 session("oRpt").Destination = 1
	 session("oRpt").PrintReport
End If

and nothing prints....

Where am I going wrong ??

Thanks in advance
Tony
Message #2 by "Embrey, Darrell (DL)" <DLEmbrey@d...> on Fri, 26 Apr 2002 12:11:10 -0400
Have you been to the Crystal Decisions Support page? They have examples you
can download and adapt to your specific needs. The URL is
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/aspxmps85.ex
e.asp.
___________________________________________________________

Darrell L. Embrey
Information Systems Technologist - Kelly Technical Services
On Assignment at The Dow Chemical Company
Legal Tech & Admin Services
1790 Building Office 186
Midland, MI  48674 USA 
Voice:  xxx.xxx.xxxx  
Fax:	989.636.1352
E-mail:  DLEmbrey@d...


 -----Original Message-----
From: 	Tony Cooper [mailto:tony.cooper@h...] 
Sent:	Friday, April 26, 2002 12:55 PM
To:	crystal_reports
Subject:	[crystal_reports] Print directly from ASP page without going
through Viewer

Hi all

Hope you can help.
Using the ParameterFields.asp example in the ASP Samples that come with CR 
8.5, I've been able to pass paramters to a report and display it in a 
viewer.

I now want to extend the functionality a little and allow the user to 
print the report directly, and not go through the viewer. I can't seem to 
be able to code around the viewer.

I populate the parameters and then do the following:-

If Request.Form("output") = "Preview"
....
.... do the viewer stuff ...
Else
	 session("oRpt").PrintOut = False
	 session("oRpt").Destination = 1
	 session("oRpt").PrintReport
End If

and nothing prints....

Where am I going wrong ??

Thanks in advance
Tony
Message #3 by Tony Cooper <Tony.Cooper@H...> on Mon, 29 Apr 2002 12:20:44 +0100
Thanks for the link.
I did find something in the version 8 examples.
I can't understand why we have to use the session("oRpt").SelectPrinter
method.
It's not ideal

Why doesn't the report just print to the user's default printer?

Tony


-----Original Message-----
From: Embrey, Darrell (DL) [mailto:DLEmbrey@d...]
Sent: 26 April 2002 17:11
To: crystal_reports
Subject: [crystal_reports] RE: Print directly from ASP page without
going through Viewer


Have you been to the Crystal Decisions Support page? They have examples you
can download and adapt to your specific needs. The URL is
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/aspxmps85.ex
e.asp.
___________________________________________________________

Darrell L. Embrey
Information Systems Technologist - Kelly Technical Services
On Assignment at The Dow Chemical Company
Legal Tech & Admin Services
1790 Building Office 186
Midland, MI  48674 USA 
Voice:  xxx.xxx.xxxx  
Fax:	989.636.1352
E-mail:  DLEmbrey@d...


 -----Original Message-----
From: 	Tony Cooper [mailto:tony.cooper@h...] 
Sent:	Friday, April 26, 2002 12:55 PM
To:	crystal_reports
Subject:	[crystal_reports] Print directly from ASP page without going
through Viewer

Hi all

Hope you can help.
Using the ParameterFields.asp example in the ASP Samples that come with CR 
8.5, I've been able to pass paramters to a report and display it in a 
viewer.

I now want to extend the functionality a little and allow the user to 
print the report directly, and not go through the viewer. I can't seem to 
be able to code around the viewer.

I populate the parameters and then do the following:-

If Request.Form("output") = "Preview"
....
.... do the viewer stuff ...
Else
	 session("oRpt").PrintOut = False
	 session("oRpt").Destination = 1
	 session("oRpt").PrintReport
End If

and nothing prints....

Where am I going wrong ??

Thanks in advance
Tony

Message #4 by senthil kumar <dskumar74@y...> on Mon, 29 Apr 2002 05:05:58 -0700 (PDT)
If you have more than one printer installed and you
want to choose a different printer for printing, you
can go for selectprinter method which accepts
arguments like printername,drivername etc.,. But i
have experienced a lot of difficulties when i tried to
use this PrintOut method. Since IIS has control over
the Network resource, printing will not be consistent.
I had a bitter experience using this. Later i switched
back to CrystalViewer's printReport method. You can
hide the crviewer object and still you can print the
report. All the best.

Thanks & regards

Senthil
 
--- Tony Cooper <Tony.Cooper@H...>
wrote:
> 
> Thanks for the link.
> I did find something in the version 8 examples.
> I can't understand why we have to use the
> session("oRpt").SelectPrinter
> method.
> It's not ideal
> 
> Why doesn't the report just print to the user's
> default printer?
> 
> Tony
> 
> 
> -----Original Message-----
> From: Embrey, Darrell (DL) [mailto:DLEmbrey@d...]
> Sent: 26 April 2002 17:11
> To: crystal_reports
> Subject: [crystal_reports] RE: Print directly from
> ASP page without
> going through Viewer
> 
> 
> Have you been to the Crystal Decisions Support page?
> They have examples you
> can download and adapt to your specific needs. The
> URL is
>
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/aspxmps85.ex
> e.asp.
>
___________________________________________________________
> 
> Darrell L. Embrey
> Information Systems Technologist - Kelly Technical
> Services
> On Assignment at The Dow Chemical Company
> Legal Tech & Admin Services
> 1790 Building Office 186
> Midland, MI  48674 USA 
> Voice:  xxx.xxx.xxxx  
> Fax:	989.636.1352
> E-mail:  DLEmbrey@d...
> 
> 
>  -----Original Message-----
> From: 	Tony Cooper
> [mailto:tony.cooper@h...] 
> Sent:	Friday, April 26, 2002 12:55 PM
> To:	crystal_reports
> Subject:	[crystal_reports] Print directly from ASP
> page without going
> through Viewer
> 
> Hi all
> 
> Hope you can help.
> Using the ParameterFields.asp example in the ASP
> Samples that come with CR 
> 8.5, I've been able to pass paramters to a report
> and display it in a 
> viewer.
> 
> I now want to extend the functionality a little and
> allow the user to 
> print the report directly, and not go through the
> viewer. I can't seem to 
> be able to code around the viewer.
> 
> I populate the parameters and then do the
> following:-
> 
> If Request.Form("output") = "Preview"
> ....
> .... do the viewer stuff ...
> Else
> 	 session("oRpt").PrintOut = False
> 	 session("oRpt").Destination = 1
> 	 session("oRpt").PrintReport
> End If
> 
> and nothing prints....
> 
> Where am I going wrong ??
> 
> Thanks in advance
> Tony
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

  Return to Index