How do i Print By Form using vb2008?
-
31 Temmuz 2012 Salı 13:10
Hi all
I created Report Manualy without using any report control in vb2008 windows form.
How can i Print that Report directly using vb2008.
Thanks in advance...
Tüm Yanıtlar
-
31 Temmuz 2012 Salı 19:50
- Yanıt Olarak Öneren Mark Liu-lxfModerator 01 Ağustos 2012 Çarşamba 07:02
- Yanıt Olarak İşaretleyen Mark Liu-lxfModerator 09 Ağustos 2012 Perşembe 08:49
-
03 Ağustos 2012 Cuma 07:06
Hi Armin Zingler
Thanks for your reply.... The above link is helped me how to print a form... Form that
i used the below code to take Print....This code is working, But not directly taking Print. When i click the print button - It will
shows the Msgbox Printint-Page 1 of document with the only Option Cancel Under this "Save the file as" Window... After saved the file.
From the Saved file to Im taking Print.... How can i Print a form Directly without Doing Any save action....
'Set the Print Page Position
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Left = 0
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Right = 0
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Top = 0
PrintForm1.PrinterSettings.DefaultPageSettings.Margins.Bottom = 0
'Set the Print type Landscape
PrintForm1.PrinterSettings.DefaultPageSettings.Landscape =
True
'Print code
PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter
PrintForm1.Print(
Me, PowerPacks.Printing.PrintForm.PrintOption.FullWindow)
-
03 Ağustos 2012 Cuma 07:57I'm afraid, I'm not familiar with the MSVB power packs. Maybe you're using a PDF printer that asks you to save the file? I don't know.
Armin
-
03 Ağustos 2012 Cuma 08:23
Hi Armin Zingler
Thanks for your reply
-
07 Ağustos 2012 Salı 09:48
Hi Sivaranjini,
not sure where is wrong but it seems no need to save the page and than print it. you can just print the form without saving.
here is some information about it, you can check it.
How to: Print a Form by Using the PrintForm Component (Visual Basic):http://msdn.microsoft.com/en-us/library/bb629268.aspx
Printing and Reporting (Visual Basic):http://msdn.microsoft.com/en-us/library/bb882691
VB FAQ: How do I print a form in VB.NET?http://social.msdn.microsoft.com/Forums/en/Vsexpressvb/thread/72b5a038-912d-4455-929d-89eeb9984d7c
No code, No fact.
- Düzenleyen calanghei 07 Ağustos 2012 Salı 09:53
- Yanıt Olarak İşaretleyen Mark Liu-lxfModerator 09 Ağustos 2012 Perşembe 08:50
-
07 Ağustos 2012 Salı 10:00
Hi Calanghei
Thank you for your reply.... I thought, i did mistake in PrintForm Property setting
For that it comes like that... Thank you ...
- Yanıt Olarak İşaretleyen Mark Liu-lxfModerator 09 Ağustos 2012 Perşembe 08:50
-
07 Ağustos 2012 Salı 11:54
Hi Calanghei And Armin Zingler
Thanks to both of you for your reply... I found Solution... So Now i can able to Print directly....
- Düzenleyen sivaranjini 07 Ağustos 2012 Salı 11:54