Hide data columns at runtime

serifelsenserifelsen Unknown
edited 11:34AM in FastReport .NET
Hi

I have created report with some columns. Now I want to select visible data columns at runtime.

I have setted "visible = false;" for all columns (also for column header)
at _StartReport method I am checking which column should be printed and I am setting "visible = true" for that column
However I am using "dock = left" for each column, dock does not work.

Please help me

Comments

  • edited 11:34AM
    Hello,

    Visible is not considered while docking the objects. Either set the Width of such objects to 0, or use the Table object where you can hide the entire column.
  • serifelsenserifelsen Unknown
    edited 11:34AM
    AlexTZ wrote: »
    Hello,

    Visible is not considered while docking the objects. Either set the Width of such objects to 0, or use the Table object where you can hide the entire column.

    first of all, thanks for the reply

    I have used table object and able to hide a column. Is there any property of the table object like "Auto column width" that enlarges columns. I want to enlarge visible columns to the entire page.
  • edited 11:34AM
    No, there is no such property. The AutoWidth property of the column makes the smallest possible width to fit all data in the column's cells. You may use the script to fix column width to make the table fit to page width. It can be done in the band's AfterLayout event.

Leave a Comment