المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : الدرس الاول : مقدمة لشرح اداة Print Document


eshrag.net
10-04-2010, 08:26 PM
بسم الله الرحمن الرحيم
ماهى أداة Print Document :هى اداة من ادوات الطباعة الموجودة فى صندوق ادوات tools box فيجوال بيسيك دوت نت باصداراته المختلفة من 2003 الى 2010
وظيفتها :تستخدم فى طباعة وانشاء التقارير المختلفة على اختلاف بساطة هذه التقارير او تعقيداتها
مميزاتها :1- اداة داخلية من بيئة الفيجوال بيسيك دون نت ( اى انها لا تحتاج الى ملفات خارجية لتشغيلها بعكس مثلا الكريستال روبرت )
2- سرعة تحميل التقرير واظهاره ( الامر لا يتعدى اجزاء من الثانية )
3- امكانياتها غير محدودة
4- تظهر التقارير بالاتجاهين العربى واللاتينى
5- يمكن ان تطبع اى شئ على الفورم او من قاعدة البيانات مباشرة او بيانات داخل داتا جريد او تكست بوكس او ليبول .. الخ
عيوبها :1- تعتمد اساسا على كتابة التقرير بالكود
طريقة عملها :1- تكتب ما تريد طباعته داخل حدث PrintPage بالكود
2- تحديد اتجاه الورقة وهوامشها والتحكم بالمساحة المطبوعة عن طريق الكود
3- يستخدم الامر (e.PageBounds.Width) لمعرفة العرض الكلى للورقة
4-يستخدم الامر (e.PageBounds.Height) لمعرفة الارتفاع الكلى للورقة
5- يستخدم الامر(PrintDocument1.DefaultPageSettings.Landscape = False ) لجعل الطباعة portrate
6- يستخدم الامر(PrintDocument1.DefaultPageSettings.Landscape = true) لجعل الطباعة landscape
7- غالبا يرتبط وجودها بأداة Print Preview وهى اداة معاينة الطباعة وهى ايضا اداة داخلية موجودة فى صندوق الادوات وتقوم بعرض النتيجة الطباعية لهذه الاداة على الشاشة (معاينة ما قبل الطباعة )
مقارنة بينها وبين اداة الكريستال روبرت :1- اداة الكريستال روبرت تعتمد على ملفات خارجية لتشغيلها وضرورة الحاق هذه الملفات الخارجية بالمشروع لتعمل (مثل ملفات التقارير *.rpt ومثل اداة الكريستال نفسها ) مما يضخم حجم المشروع فى حين ان اداتنا محل الحديث لا تحتاج الى كل هذا ولا تحتاج لأى ملف خارجى لتشغيلها
2- اداة الكريستال روبرت لا تعتمد اتجاه العربى من اليمين الى اليسار بينما اداتنا يمكن التحكم بها (عن طريق الكود) لتطبع بالاتجاه الذى ترغب فيه وحتى الاتجاه الرأسى
4- اداة الكريستال روبرت تحتاج الى وقت يتعدى عدة ثوانى ويصل احيانا الى دقائق (اعتمادا على مواصفات الجهاز ) لتظهر نتيجة التقرير اما اداتنا فظهور التقرير لا يتعدى اجزاء من الثانية مع الامكانيات الدنيا للاجهزة
5- طريقة استعمال الباراميترات فى الكريستال مرهقة ومعقدة وتحتاج الى احتراف بينما اداتنا تعتمد على الكود
6- اداة الكريستال روبرت يجب مراعاة (فى اغلب الاحوال ) توافق اصدارها مع اصدار فيجوال بيبسيك دوت نت الامر الذى انت فى غنى عنه فى اداتنا
7- اداة الكريستال روبرت اداه خارجية غريبة عن بيئة الفيجوال بعكس اداتنا التى هى فى الاساس مكون من مكونات الفيجوال بيسيك دوت نت ( والامر ينطبق ايضا على السى شارب ) فهى اداة من مكونات الفيجوال ستديو دوت نت بشكل عام
اخيرا .. سيتم ان شاء الله من الدرس القادم شرح تفصيلى متطور ومتدرج لهذه الاداة مصحوبا مع مشاريع مفتوحة المصدر كتمثيل لكل جزئية من جزئيات الشرح


المقال : أصلى للكاتب .. ويجوز تناقله وتداوله مع الاشارة الى المصدر والكاتب (ياسر عبدالجليل - مصر)

هذه ترجمة لمقالنا الى اللغة الانجليزية لتمام الافادة:
In the name of God
What tool Print Document:
Is an instrument of the print found in the toolbox tools box Visual BASIC NET matte different from 2003 to 2010

Function:
Used to print various reports and the creation of different reports or the simplicity of this complexity

Advantages:
1 - internal tool of the Visual BASIC environment without the Net (that is, they do not need external files to run contrary to the crystal, for example Robert)
2 - Download speed and show him (it does not exceed the parts of a second)
3 - their potential is limited
4 - reports show the Arab and Latin in both directions
5 - can be printed on anything from form or directly from the database or data within the Data Grid, Text, or Xbox or pee .. Etc.

Disadvantages:
1 - depends mainly on writing CODE

The way it works:
1 - write what you want to print in the event PrintPage CODE
2 - determine the direction of the paper and margins, and distance control through the printed code
3 - uses it (e.PageBounds.Width) to know the overall width of the paper
4 - uses it (e.PageBounds.Height) to know the total height of the paper
5 - uses it (PrintDocument1.DefaultPageSettings.Landscape = False) to make the print portrate
6 - uses it (PrintDocument1.DefaultPageSettings.Landscape = true) to make the print landscape
7 - often linked to its presence with a tool, a tool Print Preview Print Preview is also an internal tool found in the toolbox and you view the result of printing this tool on the screen (preview before printing)

Comparison between them and the tool Crystal Robert:
1 - tool Crystal Robert depend on external files to run and the need to inflict these external files to the project to do (such as files, reports *. rpt and tool like crystal itself), which magnifies the size of the project, while that our instrument shop talk do not need all this does not require any external file to run
2 - Robert crystal tool do not support the Arab direction from right to left, while our instrument can be controlled (by code) to be printed in the direction you want and even the vertical direction
4 - Robert crystal device need time beyond a few seconds and sometimes up to minutes (depending on the specifications of the device) to show the outcome of the report The report emergence of our instrument does not exceed the second parts of the world with the possibilities of the machines
5 - How to use parameters in the crystal is cumbersome and complex and need to be professional while our instrument depends on the code
6 - Robert crystal tool must take into account (in most cases) agree issued with the release of Visual Bebsek Dot Net in which you are indispensable in our instrument
7 - Robert crystal tool tool extraneous environment for Visual unlike our instrument, which is essentially a component of Visual BASIC NET (and it also applies to C #) is a tool of the components of Visual Studio NET in general

Finally .. Will be, God willing, the next lesson detailed explanation of the sophisticated and progressive approach to this instrument, coupled with open source projects each partial explanation particulars


Article: a native of the author .. May be handed down and traded with reference to the source and author: Yasser Abdul Jalil- Egypt