473,506 Members | 16,994 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 2068
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.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 #3

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

Similar topics

1
9549
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
2204
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: ...
0
1687
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...
1
2628
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...
1
5424
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
5059
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
4064
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
1410
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...
0
5732
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
1298
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...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7021
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...
0
7478
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...
1
5035
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...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1532
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 ...
0
409
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...

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.