public Rdl.TablixType CreateTable() { Tablix table = new Tablix(); table.Style = new Style { Border = new Border { Style = "Solid" }.Create() }.Create(); table.TablixBody = new TablixBody().Create(); TablixBody tableBody = new TablixBody(); tableBody.TablixColumns = new TablixColumnsType[] { CreateTablixColumns() }; TablixRows rows = new TablixRows(); List<TablixRowType> rowList = new List<TablixRowType>(); TablixMembersType m_rowHierarchy = new TablixMembersType(); List<TablixMemberType> members = new List<TablixMemberType>(); if (ShowHeader) { rowList.Add( CreateHeaderTableRow()); TablixMember m = new TablixMember(); m.KeepWithGroup = TablixMemberTypeKeepWithGroup.After; members.Add(m.Create()); } if (ShowDetails) { rowList.Add(CreateTableRow()); //����Ϊ��ϸ TablixMember m = new TablixMember(); GroupType g = new GroupType(); g.Name = "��ϸ��Ϣ"; m.Group = g; TablixMembersType childMembers = new TablixMembersType(); TablixMember childMember = new TablixMember(); childMembers.TablixMember = new TablixMemberType[] { childMember.Create() }; m.TablixMembers=childMembers; members.Add(m.Create()); } rows.TablixRow = rowList.ToArray(); //<TablixRowHierarchy> m_rowHierarchy.TablixMember = members.ToArray(); TablixHierarchy rowHierarchy = new TablixHierarchy(); rowHierarchy.TablixMembers = new TablixMembersType[] { m_rowHierarchy }; table.TablixRowHierarchy = rowHierarchy.Create(); //if (Parent.Grouping!=null) //{ // table.TableGroups = CreateTableGroups(); //} tableBody.TablixRows = new TablixRowsType[]{ rows.Create()}; table.TablixBody = tableBody.Create(); //<TablixColumnHierarchy> table.TablixColumnHierarchy = CreateTablixColumnHierarchy(); table.Top = "0.2mm"; table.Left = Parent.LeftMargin.ToString() + "mm"; return table.Create(TableName); }
private TablixHierarchyType CreateTablixRowHierarchy() { var members = CreateMs(new TablixMembersType(), true, true); var hie = new TablixHierarchy { TablixMembers = new TablixMembersType[] { members } }; return hie.Create(); }
public TablixHierarchyType CreateTablixColumnHierarchy() { TablixMembersType main = new TablixMembersType(); List<TablixMemberType> members = new List<TablixMemberType>(); foreach (var f in m_fields) { TablixMember m = new TablixMember(); members.Add(m.Create()); } main.TablixMember = members.ToArray(); TablixHierarchy hie = new TablixHierarchy(); hie.TablixMembers = new TablixMembersType[] { main }; return hie.Create(); }