473,324 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

printing crystal report without opening it.

yes,Iam using button onclick event.
the code is as under
'PrintReport()

prtdoc.PrinterSettings.PrinterName = comboInstalledPrinters.SelectedItem.Text

Dim strDefaultPrinter As String = prtdoc.PrinterSettings.PrinterName
'Dim rap As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent()
'report1.Load("c:\inetpub\wwwroot\ticket\printrpt. rpt")
Dim margins As PageMargins

' Get the PageMargins structure and set the
' margins for the report.

''
margins = report1.PrintOptions.PageMargins
margins.bottomMargin = 200
margins.leftMargin = 200
margins.rightMargin = 50
margins.topMargin = 100
''Apply the page margins.
report1.PrintOptions.ApplyPageMargins(margins)
''
' Select the printer.
report1.PrintOptions.PrinterName = strDefaultPrinter

' Print the report. Set the startPageN and endPageN
' parameters to 0 to print all pages.

report1.PrintToPrinter(1, True, 0, 0)
end sub

When I am giving print blank page is coming instead of the report.
the report instance name is report1.Iam also passing parameter to this report.
when Iam giving print command the reports content are visible under the form.
but it is not visible on the print out paper.even the toolbar of the report also not visible.
Any idea. Plz.. its urgent
Feb 15 '07 #1
0 1201

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: DCraig | last post by:
I'm having problems printing to a line printer from both Crystal Reports and SQL Server reporting services using dotnet. When I try and print a report from an application with Crystal I get the...
1
by: rdshultz | last post by:
My company is going to a new software were I have to learn Crystal Reports. Had my first class and I'm a little confused. The instructor said everytime you run a Crystal report you have to do a...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: Ray | last post by:
Hi all, I would like to ask is there any method for printing the crystal report directly by choosing printer without previewing the report using CrystalReportViewer? Thanks a lot, Ray
1
by: darf | last post by:
Firstly, I'm VERY green on all this Crystal stuff - so please excuse my ignorance. I see on other posts that to print a report without using the viewer use: Dim crReportDocument As...
1
by: Dreamtime | last post by:
Hi I am using Visual Studio 2005 and the bundled Crystal Reports (previously I used .net 2003 and bundled Crystal Reports for 2 years - same issues!) I have a report which is displayed in the...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
0
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then...
0
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.