|
-
Dec 22nd, 2003, 03:26 PM
#1
Thread Starter
Lively Member
Couple of Crystal questions...
1) I need my report to appear twice on the same page so I can cut it in half. How can I make it 'mirror' itself in the botton half of the page?
2) How can I tell my report what printer will it use, and finally
3) How do I make it print without getting the printers prompt? I tried CRViewer1.PrintReport but I get the prompt... Thanks in advance!
-
Dec 23rd, 2003, 01:38 PM
#2
No idea about question #1.
For questions 2 and 3 I am assuming your report is currently being viewed in the crviewer control (why are you not using the Print button on the control).
Anyways, use the methods of the CRAXDRT.Report object instead.
I have Version 8.5 with some hot fixes.
VB Code:
Private Sub Command1_Click()
Dim objReport As CRAXDRT.Report
Set objReport = CRViewer1.ReportSource
objReport.PrinterSetup 0
'Or objReport.PrinterSetupEx 0
'depends on your version
objReport.PrintOut False 'print the report
End Sub
-
Dec 24th, 2003, 08:24 AM
#3
Thread Starter
Lively Member
Thanks a milllion Bruce!
I dont want to use the print button on the crviewer because I have a number of tems on a listview ans must print a new report for each one. Thats why I want to be able to print automatically, so my routine can print the reports while looping thru the listview.
Does "objReport.PrinterSetup 0" make the report use the default printer?
-
Dec 24th, 2003, 11:59 AM
#4
So there is no reason to use the CRViewer.
VB Code:
Dim objReport as CRAXDRT.Report
Set objReport = <CrystalAppObject>.OpenReport(PathToReport)
'Set any parameter fields
objReport.ReadRecords
objReport.PrintOut False
objReport.PrinterSetup 0 - shows a dialog that allows the user to select a printer.
As far as I know the report is always printed to the default printer.
There is another method called PrinterSelect or is it SelectPrinter that allows you to set the printer in code without a dialog box.
-
Jan 13th, 2004, 11:07 AM
#5
Thread Starter
Lively Member
Hey Bruce I solved question 1 by adding the same subreport twice in the same report and playing around with the spacing until they are the same size and take the whole page.
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
|