Home Forums WinForms controls Xceed Grid for WinForms Creating Reports for Xceed grid which is having master detail

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16187 |

    Hi,

    I’m trying to create report styles to suit my needs, but it seems there is no report elements that distinguish mastergrid and detailgrid elements. e.g When creating a new report style, the element Column Headers applies to both(master and detail grid) headers in the report, therefore I can’t set diferent column header colours for master and detail grid.

    Also, Is it possible to set the detail grid columns’ width ? At this time, I am doing this in code, but that wouldn’t be a good solution as the user might want to define their own printing preferences.

    Once master and detail grid seem to be managed by the same elements, I am unable to set page breaks and keepTogether properties, therefore my report just does not look good at this time. I thought Groups elements could cater for that, but it doesn’t work in this case.

    Please let me know of a good solution for these issues.

    Thanks,

    Pravi

    Imported from legacy forums. Posted by pravi (had 1331 views)

    User (Old forums)
    Member
    Post count: 23064

    Like you wrote, the report styles of detail grids is specified with code. For example:

    Xceed.Grid.DetailGrid detailGrid = new Xceed.Grid.DetailGrid();

    detailGrid.Columns.Add( new Xceed.Grid.Column( “Value”, typeof( string ) ) );

    this.gridControl1.DetailGridTemplates.Add( detailGrid );

    detailGrid.ReportStyle.BackColor = Color.Pink;

    detailGrid.Columns[ 0 ].ReportStyle.BackColor = Color.Blue;

    and so forth.

    The CustomizeReportStyleForm class that is supplied with the component is meant to be a starting point. It does not cover master-detail report style in a generic way because many of our clients use master-detail grids in very different ways. That made it impossible for us to find a common user-interface for them.

    The full source code of both the GenerateReportForm and CustomizeReportStyleForm classes are provided with the component. You are free to modify them to provide a user-interface to specify report styles for your detail grids.

    You will find the source code here :

    C:\Program Files\Xceed Components\Xceed Grid for .NET <version>

     

    Imported from legacy forums. Posted by André (had 455 views)

    User (Old forums)
    Member
    Post count: 23064

     Hi Andre,

    Thanks for ur reply.

    but i want to add another linklable like “Add sub-group level” and from that click event i want to generate report styles for sub-detail grid levels .

     I will be very thankfull if i get any solution for this.

    Thanks,

    Pravi.

    Imported from legacy forums. Posted by pravi (had 478 views)

    User (Old forums)
    Member
    Post count: 23064

    One way you could do it is through the Xceed.Grid.Reporting.ReportStyleSheet.Grid.DetailGrids object, which controls the report styles of detail grid templates (look at the documentation of DetailGrids for complete information).

     

    To get what you want, you will need to modify the CustomizeReportStyleForm class to add user-interface elements that get and set the various GridReportStyle properties that the DetailGrids collection controls.

     

    Like we said before, the CustomizeReportStyleForm code is yours to play with to add functionality.

    Imported from legacy forums. Posted by André (had 441 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks Andre for ur suggestions.

    Atlast I got what I want,

    Once again thanks for ur support.

    Imported from legacy forums. Posted by pravi (had 679 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Andre,

    Now i have customized the code in CustomizeReportStyleForm and am geeting desired result, even i have customized Grnerate report form code to make detail grids columns visible to edit,

    Now I am having another problem,It is taking long time to load Generate Report form screen.

    Is there any solution for that.

    Kindly Reply me.

    Thanks,

    Pravi.

    Imported from legacy forums. Posted by pravi (had 674 views)

    User (Old forums)
    Member
    Post count: 23064

    It is difficult to tell.  Most likely, the detail grids have too many rows, and it takes time to load all those rows with the specific ReportStyle properties.  There is probably not much to do about this.

    Imported from legacy forums. Posted by André (had 1153 views)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.