简体   繁体   中英

Is there a way to print the current view for the DevExpress GridControl PrintingSystem?

I am currently using DevExpress 10.2 within Visual Studio 2010. I am printing the contents of the GridControl (with both one and two GridViews contained within). This shows all the current visible columns (and not the invisible columns) and all the data in a viewable manner.

My issue is the print preview always shows all the grouped rows and the master-detail rows fully expanded. I want to make it so that if the user has none of the groups or rows expanded then the print preview displays the grid with none of the groups or rows expanded. Also if the user expands the first group and rows fully then only the first group and rows will be expanded in the print preview and none other.

Is there a way to be able to do this? Currently I love the printing component other than this facet.

Currently I am doing this by:

 PrintableComponentLink1.CreateDocument()
 With PrintableComponentLink1.PrintingSystem.PageSettings
     .TopMargin = 40
     .LeftMargin = 2
     .RightMargin = 2
     .BottomMargin = 40
     .Landscape = True
 End With
 PrintableComponentLink1.ShowPreview()

Along with customizing the report via the CreateReportHeaderArea and the CreateMarginalFooterArea functions.

Based on what I have tried it is not currently possible and this Issue on the DevExpress support site seems to confirm that.

Right now, in server mode with a master-detail grid, you can print all detail rows expanded (optionsprint.expandalldetails=true) or no detail rows expanded (optionsprint.expandalldetails=false).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM