Hide a row in a grid using ManualBuild

Hi, i'm evaluating FastReport. I need to know if this action can be done.
I'm filling a table using the manualBuild event, using this code (taken from a demo), to fill a grid where rows are columns:
      DataSourceBase columnData = Report.GetDataSource("TestDataSource");
      columnData.Init();
      // print the first table column - it is a header
      Table5.PrintColumn(0);
      // each PrintColumn call must be followed by either PrintRow or PrintRows call
      // to print cells on the column
      Table5.PrintRows();

      Table5.PrintColumn(1);      
      Table5.PrintRows();
      
      // now enumerate the data source and print the table body
      while (columnData.HasMoreRows)
      {
        // print the table body  
        Table5.PrintColumn(2);
        Table5.PrintRows();

        // go next data source row
        columnData.Next();
      }

My question is: after i've filled the grid, is there a way to detect if a row has all empty values? and a way to hide it?
Thank you

Comments

  • edited 6:58AM
    capedica wrote: »
    Hi, i'm evaluating FastReport. I need to know if this action can be done.
    I'm filling a table using the manualBuild event, using this code (taken from a demo), to fill a grid where rows are columns:
          DataSourceBase columnData = Report.GetDataSource("TestDataSource");
          columnData.Init();
          // print the first table column - it is a header
          Table5.PrintColumn(0);
          // each PrintColumn call must be followed by either PrintRow or PrintRows call
          // to print cells on the column
          Table5.PrintRows();
    
          Table5.PrintColumn(1);      
          Table5.PrintRows();
          
          // now enumerate the data source and print the table body
          while (columnData.HasMoreRows)
          {
            // print the table body  
            Table5.PrintColumn(2);
            Table5.PrintRows();
    
            // go next data source row
            columnData.Next();
          }
    

    My question is: after i've filled the grid, is there a way to detect if a row has all empty values? and a way to hide it?
    Thank you

    Hi Capedica
    Did you tried to use event AfterData for your DataBand?
    You can check if all values are null or empty and then set Visible to false if they are all empty.

    Regards
    Daniel

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.