|
-
Sep 13th, 2000, 01:17 PM
#1
how can i use the print command dialog box available in VB 6.0 to print crystal reports ??
i want the flexibity at run time to change the printer and also send reports via fax or e-mail them . or is there any other way out to do the same
-
Sep 13th, 2000, 05:48 PM
#2
make your own with a listbox using this code to help you
Code:
' Load all printers into the listbox of printers.
' Select in the listbox the current default printer.
For Each Prntr In Printers
ListBox1.AddItem Prntr.DeviceName
If Prntr.DeviceName = Printer.DeviceName _
Then ListBox1.Selected(ListBox1.ListCount - 1) = True
Next
' Find the printer selected by the user in the list of all
' printers, and select that printer.
For Each Prntr In Printers
If Prntr.DeviceName = ListBox1.List(SubSP) Then
Set Printer = Prntr
Exit For
End If
Next
-
Sep 18th, 2000, 09:02 PM
#3
Lively Member
Originally posted by larryn
make your own with a listbox using this code to help you
Code:
' Load all printers into the listbox of printers.
' Select in the listbox the current default printer.
For Each Prntr In Printers
ListBox1.AddItem Prntr.DeviceName
If Prntr.DeviceName = Printer.DeviceName _
Then ListBox1.Selected(ListBox1.ListCount - 1) = True
Next
' Find the printer selected by the user in the list of all
' printers, and select that printer.
For Each Prntr In Printers
If Prntr.DeviceName = ListBox1.List(SubSP) Then
Set Printer = Prntr
Exit For
End If
Next
Hi there,
As a crystal report expert, I think you could help me.
I want to open the crystal report in the crystal report program, when the user clicks a command button.
Very simple, but don't know.
Your help would be greatly appreciated.
Thank you.
Rathi
-
Sep 19th, 2000, 12:37 PM
#4
add the crystal report control to your form
and right click on the control.
choose properties and on the general tab
make sure that To Window is the option chosen.
name the control crpt or whatever you like..
and attach this code to a command button
Use_ReportsPath is the path to my reports folder
Code:
'print report
crpt.ReportFileName = Use_ReportsPath & "MyReport.rpt"
crpt.PrintReport
at this time the report will print on screen
hope this helps you out
-
Sep 20th, 2000, 06:53 AM
#5
Lively Member
Originally posted by larryn
add the crystal report control to your form
and right click on the control.
choose properties and on the general tab
make sure that To Window is the option chosen.
name the control crpt or whatever you like..
and attach this code to a command button
Use_ReportsPath is the path to my reports folder
Code:
'print report
crpt.ReportFileName = Use_ReportsPath & "MyReport.rpt"
crpt.PrintReport
at this time the report will print on screen
HI there,
Thanks for your valuable time and support.
I opened the Crystal report in the crystal report program, using the shell function.
Thanks again.
Rathi
hope this helps you out
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|