Hide data columns at runtime

serifelsenserifelsen Unknown
edited 8:38AM 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 8:38AM
    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 8:38AM
    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 8:38AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.