Headingformat = true does not work

hello - i want to have repeat header but using headingformat = true does not work. Please see code enclosed below.

builder.MoveToBookmark(aComment);
builder.StartTable();
builder.CellFormat.ClearFormatting();
builder.ParagraphFormat.ClearFormatting();
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.RowFormat.HeadingFormat = true;
for (int j = 0; j <resultTable.Columns.Count; j++)
{
    builder.InsertCell();
    builder.RowFormat.HeightRule = HeightRule.AtLeast;
    builder.RowFormat.Height = 0;
    builder.CellFormat.WrapText = false;
    builder.CellFormat.FitText = false;
    builder.Font.Size = 8;
    builder.CellFormat.Shading.BackgroundPatternColor = Color.FromArgb(153, 204, 255);
    builder.Font.Color = Color.DarkBlue;
    builder.Font.Bold = true;
    string aCell = resultTable.Columns[j].ColumnName;
    if (j> 0)
    {
        builder.CellFormat.Width = 100;
        builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
        builder.Write(aCell);
    }
    else
    {
        builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
        builder.CellFormat.Width = 200;
    }
}
builder.EndRow();
builder.RowFormat.HeadingFormat = false;
string oldRegion = "default";
for (int f = 0; f <resultTable.Rows.Count; f++)
{
    DataRow aRow = resultTable.Rows[f];
    if (aRow[0].ToString() != oldRegion) builder.InsertBreak(BreakType.LineBreak);
    for (int j = 0; j <resultTable.Columns.Count; j++)
    {
        builder.RowFormat.HeightRule = HeightRule.AtLeast;
        builder.RowFormat.Height = 0;
        builder.CellFormat.WrapText = false;
        builder.CellFormat.FitText = false;
        builder.InsertCell();
        builder.Font.Bold = false;
        if (j> 0)
        {
            builder.CellFormat.Shading.BackgroundPatternColor = Color.White;
            builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
            builder.Font.Color = Color.Black;
            builder.CellFormat.Width = 100;
        }
        else
        {
            builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
            builder.CellFormat.Shading.BackgroundPatternColor = Color.FromArgb(153, 204, 255);
            builder.Font.Color = Color.DarkBlue;
            builder.CellFormat.Width = 200;
        }
        string aCell = string.Empty;
        if (aRow[j].ToString() != oldRegion || j != 0)
        {
            aCell = aRow[j].ToString();
            if (j == 0) oldRegion = aCell;
        }
        builder.Write(aCell);
    }
    builder.EndRow();
}
builder.EndTable();

Hi

Thanks for your request. Heading format works fine on my side.
Currently, heading rows are not supported during rendering and converting to PDF. So if you save your output document in PDF format, heading rows will not be repeated on each page.
Best regards.

This is saved to word doc. What do you suggest that I should do. Clearly, we need to resolve it at my end.

Hi

Thanks for your request. As I mentioned earlier, the code work fine on my side and the header row is repeated on each page. Could you please attach also your output document? Also, it would be great if you create simple application, which will allow me to reproduce the problem on my side.
Best regards.

The issues you have found earlier (filed as 6839) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(73)