We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Printing

Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? Is there a way for us to print out the grid to a .pdf (acrobat reader) document? Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? Thanks

17 Replies

AD Administrator Syncfusion Team February 22, 2005 11:00 PM UTC

Hi Anthony, check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid example for printing a grid as it appears on the display. You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. I have to do some research first before I can get back to you with answers to your other questions. Stefan >Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? > >Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? > >Is there a way for us to print out the grid to a .pdf (acrobat reader) document? > >Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? > >Thanks


AA Anthony Avella February 24, 2005 09:11 PM UTC

Where do I find this sample? >Hi Anthony, > >check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid >example for printing a grid as it appears on the display. > >You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. > >I have to do some research first before I can get back to you with answers to your other questions. > >Stefan > >>Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? >> >>Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? >> >>Is there a way for us to print out the grid to a .pdf (acrobat reader) document? >> >>Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? >> >>Thanks


AD Administrator Syncfusion Team February 24, 2005 11:43 PM UTC

Hi Anthony, the sample is part of the 3.0 distribution. You can log into support center and download the version there. With earlier versions printing was not working correct. The path of the sample is "Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\PrintGroupingGrid" Stefan >Where do I find this sample? > >>Hi Anthony, >> >>check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid >>example for printing a grid as it appears on the display. >> >>You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. >> >>I have to do some research first before I can get back to you with answers to your other questions. >> >>Stefan >> >>>Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? >>> >>>Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? >>> >>>Is there a way for us to print out the grid to a .pdf (acrobat reader) document? >>> >>>Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? >>> >>>Thanks


AA Anthony Avella February 25, 2005 03:05 PM UTC

This sample doesn''t seem to work for me. A print dialog comes up. But, when I click OK to print, nothing prints up. When I set grid.TableControl.PrintingMode = true, the grid disappears from the screen. Any ideas? Thanks >Hi Anthony, > >the sample is part of the 3.0 distribution. You can log into support center and download the version there. > >With earlier versions printing was not working correct. > > >The path of the sample is "Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\PrintGroupingGrid" > >Stefan > >>Where do I find this sample? >> >>>Hi Anthony, >>> >>>check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid >>>example for printing a grid as it appears on the display. >>> >>>You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. >>> >>>I have to do some research first before I can get back to you with answers to your other questions. >>> >>>Stefan >>> >>>>Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? >>>> >>>>Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? >>>> >>>>Is there a way for us to print out the grid to a .pdf (acrobat reader) document? >>>> >>>>Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? >>>> >>>>Thanks


AA Anthony Avella February 25, 2005 04:04 PM UTC

I actually got it to work. Your sample is missing the actual call to print. The problem I encounter now is that the grid doesn''t take up the whole page. Is there anyway we can alter the layout of the grid on the page. Can we fit all columns on one page? Can we make the grid take up the whole page? etc... Thanks. >Hi Anthony, > >the sample is part of the 3.0 distribution. You can log into support center and download the version there. > >With earlier versions printing was not working correct. > > >The path of the sample is "Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\PrintGroupingGrid" > >Stefan > >>Where do I find this sample? >> >>>Hi Anthony, >>> >>>check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid >>>example for printing a grid as it appears on the display. >>> >>>You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. >>> >>>I have to do some research first before I can get back to you with answers to your other questions. >>> >>>Stefan >>> >>>>Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? >>>> >>>>Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? >>>> >>>>Is there a way for us to print out the grid to a .pdf (acrobat reader) document? >>>> >>>>Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? >>>> >>>>Thanks


AA Anthony Avella March 1, 2005 02:01 PM UTC

What''s the status of this and your research for pdf and crystal reports? >I actually got it to work. >Your sample is missing the actual call to print. > >The problem I encounter now is that the grid doesn''t take up the whole page. > >Is there anyway we can alter the layout of the grid on the page. > >Can we fit all columns on one page? > >Can we make the grid take up the whole page? >etc... > >Thanks. > > >>Hi Anthony, >> >>the sample is part of the 3.0 distribution. You can log into support center and download the version there. >> >>With earlier versions printing was not working correct. >> >> >>The path of the sample is "Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\PrintGroupingGrid" >> >>Stefan >> >>>Where do I find this sample? >>> >>>>Hi Anthony, >>>> >>>>check out the Grid.Grouping.Windows\Samples\PrintGroupingGrid >>>>example for printing a grid as it appears on the display. >>>> >>>>You can customize its look by handling QueryCellStyleInfo events and check whether TableControl.PrintingMode is true. In such case you could provide a different font, color etc. Or you could simply change the GroupingControl.Appearance before the print call and reset it back after the print call. >>>> >>>>I have to do some research first before I can get back to you with answers to your other questions. >>>> >>>>Stefan >>>> >>>>>Is there a way to print the grid as it appears grouped on the screen, either expaned, closed or somewhere in between? >>>>> >>>>>Are we able to customize the grid''s appearance when we print it (fitting whole grid on one page, size of print, font, colors, boldness, etc..)? >>>>> >>>>>Is there a way for us to print out the grid to a .pdf (acrobat reader) document? >>>>> >>>>>Are we able to use the grouping grid with Crystal Reports, and still maintain the groupings we''ve created in the grid? >>>>> >>>>>Thanks


AD Administrator Syncfusion Team March 1, 2005 06:09 PM UTC

Anthony, >What''s the status of this and your research for pdf and crystal reports? With regards to crystal reports: What I learned is that crystal reports will want to do its own grouping and categorizing of the datasource. You cannot provide a list with display elements. So, export to crystal reports would only be possible if you attach the same data source to crystal reports and then check out the grouping and summary capabilities of crystal reports. For features that are similar you could then apply the same schema to the report, e.g. group by a specific column. With regards to PDF, this is at the moment not possible. But we do plan to implement a export engine that creates a PDF from the grouping engine. I have no timeframe confirmed yet when we will have that ready. My guess is a few months. If it is only a small report with only a single page then you could use the TableControl.DrawGrid method to draw the grid to a graphics context of a bitmap and then create a PDF from that bitmap. If you are interested in that let me know. That shouldn''t take too long to prepare an example and I can ask one of our Essential PDF engineers. Stefan


AD Administrator Syncfusion Team March 1, 2005 08:27 PM UTC

Anthony, I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. CustomizePrintGroupingGrid.zip There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. Stefan


AA Anthony Avella March 16, 2005 08:08 PM UTC

You did not include the CatgeoryProductsShippers.xml file for this sample >Anthony, > >I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. > >CustomizePrintGroupingGrid.zip > >There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. > >Stefan >


AA Anthony Avella March 16, 2005 09:10 PM UTC

I''m getting a compile error telling me the GridPrintToFitDocument type or namespace could not be found. I have the same references and the same >Anthony, > >I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. > >CustomizePrintGroupingGrid.zip > >There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. > >Stefan >


AD Administrator Syncfusion Team March 17, 2005 01:16 AM UTC

I uploaded it again and included the xml file. PrintGroupingGrid.zip You probaly opened the wrong .csproj file. There were two and only one of them was correct. Stefan >I''m getting a compile error telling me the GridPrintToFitDocument type or namespace could not be found. I have the same references and the same > >>Anthony, >> >>I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. >> >>CustomizePrintGroupingGrid.zip >> >>There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. >> >>Stefan >>


FH Faraz Haque April 13, 2005 04:43 PM UTC

I was trying out this application but it doesnt seem to work for me. The printpreview button works fine, but hitting the print option seems to do nothing at all. (I can print from the print option in the printpreview dialog box) -faraz >I uploaded it again and included the xml file. > >PrintGroupingGrid.zip > >You probaly opened the wrong .csproj file. There were two and only one of them was correct. > >Stefan > >>I''m getting a compile error telling me the GridPrintToFitDocument type or namespace could not be found. I have the same references and the same >> >>>Anthony, >>> >>>I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. >>> >>>CustomizePrintGroupingGrid.zip >>> >>>There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. >>> >>>Stefan >>>


AD Administrator Syncfusion Team April 14, 2005 09:03 PM UTC

Faraz, there is a call to pd.Print(); missing in menuItemPrint_Click. It should be called after calling ShowDialog() Stefan >I was trying out this application but it doesnt seem to work for me. The printpreview button works fine, but hitting the print option seems to do nothing at all. > >(I can print from the print option in the printpreview dialog box) > >-faraz > > >>I uploaded it again and included the xml file. >> >>PrintGroupingGrid.zip >> >>You probaly opened the wrong .csproj file. There were two and only one of them was correct. >> >>Stefan >> >>>I''m getting a compile error telling me the GridPrintToFitDocument type or namespace could not be found. I have the same references and the same >>> >>>>Anthony, >>>> >>>>I created a sample that customizes the cells and widths while printing and also stretches the grid to fit the whole print are. >>>> >>>>CustomizePrintGroupingGrid.zip >>>> >>>>There is a glitch with frozen column at top that will get fixed. We also need to make things easier in our library to do such things. >>>> >>>>Stefan >>>>


AA Anthony Avella June 16, 2005 04:13 PM UTC

Your sample app runs fine, although the print size is too big for my needs. When I take the print code and transport it to my app I get prinouts of tiny snapshots of the grid. How can I adjust the size of the data on the page?


AD Administrator Syncfusion Team June 17, 2005 02:57 PM UTC

Anthony, the sample in this thread has been customized to strech the cells and widths while printing and to fit the whole print area. If you do not want to stretch cells you can use the Windows\Grid.Windows\Samples\Grouping\PrintGroupingGrid that ships with version 3.x In menuItemPrint_Click add a call to pd.Print. Stefan >Your sample app runs fine, although the print size is too big for my needs. >When I take the print code and transport it to my app I get prinouts of tiny snapshots of the grid. How can I adjust the size of the data on the page?


AA Anthony Avella June 17, 2005 03:41 PM UTC

Where is the stretching done?


AD Administrator Syncfusion Team June 17, 2005 09:07 PM UTC

See these methods: GroupingControl_QueryCellStyleInfo WireQueryColWidth UnwireQueryColWidth Model_QueryColWidth GridPrintDocument.OnBeginPrint GridPrintDocument.Print GridPrintDocument.OnEndPrint These methods are all needed for the stretching. Stefan >Where is the stretching done?

Loader.
Live Chat Icon For mobile
Up arrow icon