79454661

Date: 2025-02-20 13:29:50
Score: 1
Natty:
Report link

I'm not sure how to solve the dropdown widget. However, to get the correct label in the first column of a pivot table, you have to explicit it:

pivotTable.RowHeaderCaption = "R1-Res";

if you want it to be used elsewhere:

bool firstField = true;
foreach (string fieldName in new []{ "R1-Res", "R2-Proj" })
{
    var field = pivotTable.Fields[fieldName];
    field.Outline = false;
    field.Compact = false;
    field.SubTotalFunctions = eSubTotalFunctions.None;
    var rfield = pivotTable.RowFields.Add(field);
    rfield.ShowDropDowns = true;
    rfield.Items.Refresh();

    if(firstField)
    {
        pivotTable.RowHeaderCaption = fieldName;
        firstField = false;
    }
}
Reasons:
  • Blacklisted phrase (1): how to solve
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dakcyn