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

删除回忆录丶 提交于 2019-12-11 06:31:22

问题


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.


回答1:


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).



来源:https://stackoverflow.com/questions/8761169/is-there-a-way-to-print-the-current-view-for-the-devexpress-gridcontrol-printing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!