منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
استعمال الطابعات الصغيرة - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم قواعد البيانات (http://vb4arb.com/vb/forumdisplay.php?fid=40)
+--- قسم : قسم اسئلة التقارير والطباعة تحت بيئة الـ.NET (http://vb4arb.com/vb/forumdisplay.php?fid=71)
+--- الموضوع : استعمال الطابعات الصغيرة (/showthread.php?tid=868)



استعمال الطابعات الصغيرة - تركي قرمزلي - 05-11-13

السلام عليكم و رحمة الله و بركاته
أريد طباعة الفاتورة على شكل تلك التي نراها في السوبر ماركت ، هل يمكن استعمال تقارير الكريستال ريبورت مع هذا النوع من الطابعات ؟ و كيف يمكن تحديد طول الورقة الذي يكون متغير بنسب كبيرة من 5 سم حتى اكثر من 50 سم؟
السلام عليكم ة رحمة الله و بركاته


RE: استعمال الطابعات الصغيرة - smss - 05-11-13

اكيييييييد ممكن

فقط قم بختيار الطابعه وايضا الطول والعرض
تفضل الكود ب vb.net
PHP كود :
Private Sub PrintReport(ByVal printerName As String)
   
Dim margins As PageMargins

   
' Get the PageMargins structure and set the 
   ' 
margins for the report.
   
margins Report.PrintOptions.PageMargins
   margins
.bottomMargin 350
   margins
.leftMargin 350
   margins
.rightMargin 350
   margins
.topMargin 350
   
' Apply the page margins.
   Report.PrintOptions.ApplyPageMargins(margins)

   ' 
Select the printer.
   
Report.PrintOptions.PrinterName printerName

   
' Print the report. Set the startPageN and endPageN
   ' 
parameters to 0 to print all pages.
   
Report.PrintToPrinter(1False00)
End Sub 
وهذا باc#
PHP كود :
private void PrintReport(string printerName)
{
   
PageMargins margins;

   
// Get the PageMargins structure and set the 
   // margins for the report.
   
margins Report.PrintOptions.PageMargins;
   
margins.bottomMargin 350;
   
margins.leftMargin 350;
   
margins.rightMargin 350;
   
margins.topMargin 350;
   
// Apply the page margins.
   
Report.PrintOptions.ApplyPageMargins(margins);

   
// Select the printer.
   
Report.PrintOptions.PrinterName printerName;

   
// Print the report. Set the startPageN and endPageN
   // parameters to 0 to print all pages.
   
Report.PrintToPrinter(1false,0,0);

واذا كنت من مبرمجين c++ تفضل
PHP كود :
void PrintReport(StringprinterName)
{
   
PageMargins margins;

   
// Get the PageMargins structure and set the 
   // margins for the report.
   
margins Report->PrintOptions->PageMargins;
   
margins.bottomMargin 350;
   
margins.leftMargin 350;
   
margins.rightMargin 350;
   
margins.topMargin 350;
   
// Apply the page margins.
   
Report->PrintOptions->ApplyPageMargins(margins);

   
// Select the printer.
   
Report->PrintOptions->PrinterName printerName;

   
// Print the report. Set the startPageN and endPageN
   // parameters to 0 to print all pages.
   
Report->PrintToPrinter(1false,0,0);
}; 
ارجو ان اكون قد افدك ولكن تذكر هذا بالنسبه crystal report فقط

للتعامل بواسطه doc
تفضل
http://www.computerhope.com/issues/ch000199.htm
من خلال بحثي في النترنت وجدت هذا الرابط ولكن باc#
من هنا ^_^ تفضل الزينونه


RE: استعمال الطابعات الصغيرة - تركي قرمزلي - 06-11-13

السلام عليكم و رحمة الله و بركاته
شكرا على الافادة ، بالنسبة لطول التقرير كيف يتم تعيينه؟
السلام عليكم و رحمة الله و بركاته


RE: استعمال الطابعات الصغيرة - smss - 06-11-13

وعليكم السلام ورحمه الله تعالى وبركاته
اخي شوف الكود وراح تفهم
انه الصفحه ديناميكيه فقط تحتاج للتباعد عن الهامش عن طريق marge


RE: استعمال الطابعات الصغيرة - تركي قرمزلي - 06-11-13

السلام عليكم و رحمة الله و بركاته
شكرا جزيلا أخي لنا عودة بعد شراء الطابعة و تجربتها
السلام عليكم و رحمة الله و بركاته