473,322 Members | 1,408 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,322 software developers and data experts.

PrintDialog with printPreviewDialog

Hai All...

i have a problem with my report.
my report is printdocument.

i can preview my report in PrintPreviewDialog, but i can't print my report with PrintDialog.
my code is :

Expand|Select|Wrap|Line Numbers
  1. PrintDialog1.AllowSomePage=True
  2. PrintDialog1.Document= PrintDocument1
  3.  
  4. If PrintDialog1.ShowDialog()=Windows.Forms.DialogResult.OK Then
  5.             PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
  6.             PrintKartuData.Print()
  7.         End If
BUT... it's not work...!
I can't print my report only one page...
And I can't change properties in printDialog..

Please help me..

thank's for all..
Mar 5 '13 #1
1 2162
Mikkeee
94 64KB
Looks like you're assigning everything to 'PrintDialog1' but when you print you're referencing 'PrintKartuData'.
Mar 7 '13 #2

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

Similar topics

2
by: Michael A. Covington | last post by:
By default, my PrintPreviewDialog is coming out too small. What is the best way to control its size and position? Ideally, I'd just like to maximize it. Thanks!
3
by: sachin | last post by:
How to customize PrintPreviewDialog, such that, addition of a new button, change the functionality of existing button should be possible programatically. Sample code will help a lot. Moreover, what...
4
by: Steph. | last post by:
Hi, Is there a BUG in the printdialog ? When I create a PrintDialog ans set the "DefaultPageSettings.Landscape" property to "false" and then display the dialog, select "Landscape" and click OK,...
1
by: Darrell Wesley | last post by:
Is there anyway to hook the PrintDialog to the printer icon on the PrintPreviewDialog? I know that you can print a document using the PrintDialog but it does not allow previewing and the...
1
by: Blaine | last post by:
When I show my Windows Form as a dialog box (ShowDialog(Me)) and click on a button that calls the ShowDialog of either the PageSetupDialog or PrintDialog conrtol, my Windows Form closes After I...
1
by: Franlin W | last post by:
Is it possible to print directly to file without PrintDialog or PrintPreviewDialog? Have any succeeded to program this feature? Cheers,
2
by: Richard MSL | last post by:
I am using PrintPreviewDialog to preview a file. There is a button that the user can press, which seems to print the file to the default printer. I would like to capture a click on that button so...
10
by: choupi | last post by:
Hello, Is there a way to call a printDialog from a printPreviewDialog (from print icon for example)? Indeed, the print icon in the printpreviewdialog prints directly the document without...
3
Spitaki
by: Spitaki | last post by:
Hi, When I call the sub Print the PrintDialog opens twice. What do I have to change so this won't happen again? When I call the sub PrintPreview it works just fine. Has anyone an idea what I do...
0
by: sunny123 | last post by:
How Can i set the print icon in the printpreviewdialog to go to the printdialog? when I click on Report button in my application it'll open the report in print preview screen. There when I click...
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.