CompletIT Community Server

Welcome to CompletIT Community Server Sign in | Join | Help
in Search

Re: Printing dgv

Last post 08-14-2008, 2:35 AM by iiordanov. 7 replies.
Sort Posts: Previous Next
  •  08-06-2008, 3:15 PM 7353

    Re: Printing dgv

    Hi all,

    Firstly, i got the DataGridViewExtension a couple of hours ago so still playing with it but first looks seem EXCELLENT Big Smile 

      I got it especially for the ease of use to export (for my current app that is pdf/html) and they work GREAT - SO EASY, WELL DONE TEAM.

     Just having an issue with the printing of a dgv, i have a limited datset of about 70 records and twelve fields. When i print using an ordinary print page method in vb.net (vb language), i get 2 pages printed. When i use the  DataGridViewExtension to print, i get 144 pages for the same dataset????

      I have changed my printer, used pdf printers, laser printers, inkjet printers - all the same. On all of them i have page size as A4. It seems to be printing only four records with two fields only (if i set to landscape mode, only 1 field if i set to portrait) per page??????

     Unfortunately i cannot give you a screenshot as your system won't allow it (why have it as an option???)

     I would appreciate your help with this,

    Many thanks.
     

  •  08-07-2008, 1:29 AM 7367 in reply to 7353

    Re: Printing dgv

    Hi findepter,

    Thank you very much for the positive feedback!

    We have allowed upload of images in the posts, so you can upload the screenshots you mentioned. The other possibility is to send them to us at support [at] completit [dot] com along with a sample project so we can reproduce the problem.

    Sincerely Yours
    Support Team

     

  •  08-07-2008, 5:36 AM 7380 in reply to 7367

    Re: Printing dgv

    Hi Support Team,

    Firstly, Thanks for the prompt reply - extremely rare to get a quick response from a support dept.

    I have got stuck with this problem now, i have checked ALL my code, there is NOTHING setting the page size smaller, in fact there is only 1 function to print a document through vb which works 100%. I have removed that function (just in case) and still your controls print function still prints 144 pages? I have installed a new printer - still the same. There is now absolutely no code/control in my app that has any bearing on printing except yours and its still printing 144 pages. 

     This has slowed me down now because i have been trying to sort it but no luck. 

    Thanks for opening up the image upload, again your prompt service gets five stars *****

    When i print with your control there is either a smaller page size OR the print function is printing HUGE grids? All of the font sizes are the defaults except the column headers which are bold.

    From your manual i have used the following to print:

    Imports CompletIT.Windows.Forms.Printing

    DGVEPrintManager.Print( Me.DataGridViewControl, true )

    I have tried print direct also.

     

     Unfortunately your option to upload an image still states i do not have permission?? 

     

     My  

    Your help is appreciated. Thank you. 

  •  08-08-2008, 5:27 AM 7424 in reply to 7380

    Re: Printing dgv

    Hi findepter,

    Now the images upload should be working! We changed some settings but forgot to change others... but now it must be working.
    We tried to reproduce your problem here, but without success. Can you send us (to support [at] completit [dot] com) sample project so we can reproduce it on our side.

    Thank you!

    Sincerely Yours
    Support Team

  •  08-08-2008, 8:20 AM 7427 in reply to 7424

    Re: Printing dgv

    Attachment: print dgv.jpg

    Hi Support team,

     I have looked further into this on my side. I had a printer a while ago whose page size was small (same size as an ID card) for a previous access database i had wrote. Since then, i have deleted the printer (as it was the clients i had loaned) but for some reason it seems that your dgv print method has those settings?

     I have printed everything on my system, word docs, pdf, excel, database, text files, emails etc etc etc since i deleted the id card printer and ALL have printed 100% on A4 as per the selected printer. As i have previously stated, if i use vb.nets printdocument, i can print data from my form 100% correct, i can also print using the same datagrid that your dgv control is attached to and this works perfectly to A4. Then if i immediately print using your dgv control method (without changing ANYTHING in the printer settings) , it prints to the same page size as the ID card????

     
    I have absolutely NO reference in my entire system to the ID card printer - i have gone through my registry and removed ALL possible references to the ID card printer, i have removed ALL install files for it, dll's etc - there is nothing left on my whole system that has any connection to the ID card printer. Incidentally, i removed the printer and installation files BEFORE i even started writing my current app.
    This has become too time consuming for me now, what i do not understand is that when i use your dgv control to print and select A4 as page size - why doesn't it print to the selected page size - irrelevant as to any other printer that may have been on my system, it should use the selected printer i choose in the print settings and page size - the same as any other app in the world!

    I can print directly from the datasource (its a access database) and again, it prints to a4 as selected.

     

    I have uploaded the pic for you to see. 


     


  •  08-13-2008, 1:16 AM 7574 in reply to 7353

    Re: Printing dgv

    findepter:

    Hi all,

    Firstly, i got the DataGridViewExtension a couple of hours ago so still playing with it but first looks seem EXCELLENT Big Smile 

      I got it especially for the ease of use to export (for my current app that is pdf/html) and they work GREAT - SO EASY, WELL DONE TEAM.

     Just having an issue with the printing of a dgv, i have a limited datset of about 70 records and twelve fields. When i print using an ordinary print page method in vb.net (vb language), i get 2 pages printed. When i use the  DataGridViewExtension to print, i get 144 pages for the same dataset????

      I have changed my printer, used pdf printers, laser printers, inkjet printers - all the same. On all of them i have page size as A4. It seems to be printing only four records with two fields only (if i set to landscape mode, only 1 field if i set to portrait) per page??????

     Unfortunately i cannot give you a screenshot as your system won't allow it (why have it as an option???)

     I would appreciate your help with this,

    Many thanks.
     

     

    Sorry to go off topic a bit, but could you tell me how you set it to print landscape automatically? At the moment, my users have to change this is in the print settings themselves, I'd rather it defaulted to landscape automatically if possible :)

  •  08-14-2008, 2:07 AM 7600 in reply to 7574

    Re: Printing dgv

    Hi,

    You can achieve the effect you need by making the call to the print functionality manually as shown below:

     

    DGVEPrintSettings settings = new DGVEPrintSettings();

    settings.PrintHeaderText = true;

    settings.HeaderText = "Some header text";

    settings.PrintPageNumbers = false;

    settings.Landscape = true;

    DGVEPrintManager.Print(dataGridView, settings);

    //DGVEPrintManager.PrintPreview(dataGridView, settings);

     

    These are the declarations of both overloads of the two methods located in the DGVEPrintManager class. As you see both accept print settings which can be prepared and passed by you.

    DGVEPrintManager.Print( DataGridView dataGridViewControl, DGVEPrintSettings settings );

    DGVEPrintManager.PrintPreview( DataGridView dataGridViewControl, DGVEPrintSettings settings );

     

    For more information about the print you can check chapter 6 in Developers Guide.

     

    If you have any other questions or this answer is not what you exactly needed do not hesitate to contact us, we will be happy to help you.

     

    Sincerely Yours

    Support Team

  •  08-14-2008, 2:35 AM 7601 in reply to 7427

    Re: Printing dgv

    Hi findepter,

    Really sorry for the caused inconvenience!
    We are not using anything exotic in our printing engine, and that is why the existence of such problem makes us wonder a lot.
    If you are still trying to find a solution, we would like to ask you to do a couple of things in order to see what the possible reason could be:
    - Try to delete 'DGVEPrintSettings.xml' - this file stores the last settings used for print;
    - If the demo application shipped with the installation is already available on your machine, try to print one of its grids and and define the paper size explicitly;

    Sincerely Yours
    Support Team

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems