Hiding tables / showing specific ones.


Is there any way to hide / show only certain tables in my database from the report designer?

I'm passing and ODBC connection to FR.NET and it's listing tables I shouldn't be allowing people to see.

I thought about making a dataset, but the data can be pretty large.

Thanks,

Anthony

Comments

  • edited 4:56AM
    Sorry, there is no way to hide some tables, if you pass a connection object. You may use a DataSet, there is no need to fill it with data - FastReport will automatically fill only tables that are needed in a report.
  • edited 4:56AM
    Can you explain how I'd do this?

    I can make an empty dataset, and pass it to FR, but then where will it get the data?
  • edited 4:56AM
    If you make a DataSet using Visual Studio, it will generate a DataAdapter for each table. FR will use it to fill a table.
  • edited 4:56AM
    AlexTZ wrote: »
    If you make a DataSet using Visual Studio, it will generate a DataAdapter for each table. FR will use it to fill a table.

    ah, ok, is this possible in code? - Starting with an odbcconnection, then what?
  • edited 4:56AM
    I think it's not suitable in your case. I will add an event that you can use to filter the tables.
  • edited 4:56AM
    AlexTZ wrote: »
    I think it's not suitable in your case. I will add an event that you can use to filter the tables.

    That sounds like a great solution! Thanks!
  • edited 4:56AM
    You will be able to do this in the next daily build (tomorrow):
    Config.DesignerSettings.FilterConnectionTables += DesignerSettings_FilterConnectionTables;
         
         private void DesignerSettings_FilterConnectionTables(object sender, FilterConnectionTablesEventArgs e)
         {
           if (e.TableName == "Table 1")
             e.Skip = true;
         }
    

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.