473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing the crystal report

6 New Member
Hi,Iam doing a project on ticketing.I want to print the contents in the crystal report using the button called print .Iam doing my project In .NET using visual studio 2000.Iam using dot matrix printer as my printer.
Can anybody help me solving this problem.
Feb 13 '07 #1
2 2077
kenobewan
4,871 Recognized Expert Specialist
Wow - really a dot matrix printer? What printer is it? I believe that you need to print from the button onclick event...
Feb 14 '07 #2
vinamb2006
6 New Member
yes,Iam using button onclick event.
the code is as under
'PrintReport()

prtdoc.PrinterS ettings.Printer Name = comboInstalledP rinters.Selecte dItem.Text

Dim strDefaultPrint er As String = prtdoc.PrinterS ettings.Printer Name
'Dim rap As New CrystalDecision s.CrystalReport s.Engine.Report Document()
'report1.Load(" c:\inetpub\wwwr oot\ticket\prin trpt.rpt")
Dim margins As PageMargins

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

''
margins = report1.PrintOp tions.PageMargi ns
margins.bottomM argin = 200
margins.leftMar gin = 200
margins.rightMa rgin = 50
margins.topMarg in = 100
''Apply the page margins.
report1.PrintOp tions.ApplyPage Margins(margins )
''
' Select the printer.
report1.PrintOp tions.PrinterNa me = strDefaultPrint er

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

report1.PrintTo Printer(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 #3

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

Similar topics

1
9574
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 error message "the data area passed to a system call is too small", and nothing else. With SSRS when I try to print the report from the IDE I get the same error, I can load the report up to the report server and view it with IE, then print it from...
1
2218
by: Maurice Mertens | last post by:
Hello, I'm trying to print a report to the printer but somehow it doesn't take the margins I set. I want the report to have a margin of 0.7 cm (397 twips), so in code I use the following: dim rpt as New rptOverview
0
1693
by: Bryan Bernstein | last post by:
I have an ASP.NET intranet application that uses crystal reports 9. I have three HP printers installed on the web server (windows server 2003). For the past 6 months I have had no problems with printing to any of these printers. Just recently when printing to one of the three printers I occassionally get the following error when trying to print a crystal report, "The request could not be submitted for background processing.". I have...
1
2646
by: Aaron Bronow | last post by:
I have an asp.net application which loads a Crystal Reports ReportDocument, passes in parameters for selecting data from the report's database connection, renders the report for previewing on the client then allows the user to print the report on a networked printer. To avoid having to launch an external application on the client I use a server-side print method. When I call ReportDocument.PrintToPrinter the report comes out fine but the...
1
5427
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 ReportDocument crReportDocument = New myCrystalReport() crReportDocument.PrintOptions.PrinterName = "\\server\myprinter" crReportDocument.PrintToPrinter(1, True, 1, 1) When I display the report using the Viewer I pass it some parameters,
1
5079
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 crystal reports viewer. This report needs to be printed. Its that simple! I would like to use the report.printtoprinter method as this is direct
6
4084
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 the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
0
1425
by: skrishnan68 | last post by:
Hello, When printing a crystal report from my VB.NET application, it only prints a blank page. The report was created in Crystal Enterprise v10.0. Recently we upgraded our servers and changed the OS to Windows 2003 and IIS 6.0. That is when the issue started. I am able to see the report on the screen. However, when I click on the print icon and select the printer from the printer dialog box, I get a blank page. When the website was...
0
5752
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 added the 7 as subreports so they can print one after the other. I'm supposed to be printing them from a VB.Net 2003 application and I will be passing 2 parameters (start and end dates). These reports are huge (over 1000+ pages each). My original...
0
1310
by: sili18 | last post by:
Hi All, I have an issue in printing the Crystal Report, i am using javascript method for printing (Window. Print) Am loading the rpt file in the crystal report viewer. when the report prints its always printing the page footer in a seperate sheet (next page). is there any way to find out the issue. Thanks
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.