locked
Increment Tablix objects in c# RRS feed

  • Question

  • User787663630 posted

    Hi,

    I am converting crystal reports to ssrs reports and I am converting area sections of crystal reports to tablix in ssrs.

    Below code is the object declaration.

    Tablix tab = new Tablix();
    tab.Name = crsec.ObjName;
    TablixBody tabb = new TablixBody();
    TablixColumn tabcol = new TablixColumn();
    TablixRow tabrow = new TablixRow();
    TablixHierarchy tcolHier = new TablixHierarchy();
    TablixHierarchy trowHier = new TablixHierarchy();
    List<TablixCell> tabcells = new List<TablixCell>();

    Now how can I increment all these object names in for each loop, so that each object will have its unique ID on each iteration.

    Tuesday, November 8, 2016 12:36 PM

All replies

  • User-846834550 posted

    how can I increment all these object names in for each loop

    perhaps this help

    foreach(var item in Tablix)
    {
        //Operation
    }

    Thursday, November 10, 2016 1:55 PM