Hay,
when i open report from visual basic 6 using viewer its give me only printer icon which only print direct to deafult printer without any option to choose another printer.
How i can choose which printer i want in runtime in VB6If found this:
Report.PrinterSetup 0
Report.PrintOut
But for me it was easier to create my own Printer Selection form. I added a combobox for the Printer (filling it by looping through the Printers Collection), option buttons for All Pages or a specific page range, and a spinner for number of copies. I also added properties to the SelectPrinter Form to hold the data. Once the user picks the options and clicks 'Print', VB send the data to Crystal's .Printout.
Private Sub CRViewer_PrintButtonClicked(useDefault As Boolean)
Dim cOrientation As CRPaperOrientation
Dim cSize As CRPaperSize
useDefault = False
'Capture the original Orientation and Paper Size,
' SelectPrinter resets Landscape to Portrait
cOrientation = Report.PaperOrientation
cSize = Report.PaperSize
'Reset Form and all data by calling the NewData function on the SelectPrinter Form
frmSelectPrinter.NewData
'Set Max Number of Pages
frmSelectPrinter.MaxPages = Report.PrintingStatus.NumberOfPages
'Show Form and wait for User
frmSelectPrinter.Show vbModal
If Len(frmSelectPrinter.DeviceName) > 0 Then
'If a device is selected, print report
Report.SelectPrinter frmSelectPrinter.DriverName, _
frmSelectPrinter.DeviceName, frmSelectPrinter.Port
'Set the Orientation and Paper Size to the original,
' SelectPrinter resets Landscape to Portrait
Report.PaperOrientation = cOrientation
Report.PaperSize = cSize
Report.PrintOut False, frmSelectPrinter.Copies, , _
frmSelectPrinter.FromPage, frmSelectPrinter.ToPage
End If
End Sub
Showing posts with label hay. Show all posts
Showing posts with label hay. Show all posts
Tuesday, March 20, 2012
Saturday, February 25, 2012
Only 2 Templates
Hay Guys when i installed i can find only 2 default templates for the
report builder.Where can i find more Templates please help
RegardsCan you explain what you mean by "template"?
If you are using Sept CTP Report Builder you should have three default
layouts available - Table, Matrix and Chart.
Or are you referring to report models?
Or are you referring to Report Designer, which is a separate tool from
Report Builder?
Thanks
Andrew Watt
MVP - InfoPath
On 15 Oct 2005 04:16:23 -0700, "Freeky Code" <luckyjameel@.gmail.com>
wrote:
>Hay Guys when i installed i can find only 2 default templates for the
>report builder.Where can i find more Templates please help
>Regards|||Thanks for ur prompt reply well
I am using Sept CTP Report Builder and true i found only three
templates in there
but found people working with various other templates
Could u help where can i find them
Regards
report builder.Where can i find more Templates please help
RegardsCan you explain what you mean by "template"?
If you are using Sept CTP Report Builder you should have three default
layouts available - Table, Matrix and Chart.
Or are you referring to report models?
Or are you referring to Report Designer, which is a separate tool from
Report Builder?
Thanks
Andrew Watt
MVP - InfoPath
On 15 Oct 2005 04:16:23 -0700, "Freeky Code" <luckyjameel@.gmail.com>
wrote:
>Hay Guys when i installed i can find only 2 default templates for the
>report builder.Where can i find more Templates please help
>Regards|||Thanks for ur prompt reply well
I am using Sept CTP Report Builder and true i found only three
templates in there
but found people working with various other templates
Could u help where can i find them
Regards
Subscribe to:
Posts (Atom)