Loading datasources

dannidanni Denmark
edited 2:31AM in FastReport .NET
Hi

Is there a a list of actual datasources used in a particular report.

The report may have enabled 4 of 10 datasources for the designer, but only 2 are used.

How can I discover the used datasources so I only have to load data for the 2 used datasources. Whwen I print data i want to load the least data as possible.

I suppsoe what i mean is: are the actual used datasource names saved with the report.SaveToString() method? If so where to get them? :-)

Thak you.

Comments

  • edited 2:31AM
    Hello,

    All datasources registered using report.RegisterData call, are available in the report.Dictionary.DataSources collection. Also look at report.Dictionary.Connections collection: it contains data connection defined in a report. Each connection may contain own datasources (DataConnectionBase.Tables collection).
  • dannidanni Denmark
    edited 2:31AM
    Hi again
    I am sure that will optimize my "LoadData" function for the printing of a report.

    Cheers.
  • edited 2:31AM
    The "LoadData" is called only when report is actually needs the data. You may have 10 enabled sources in a report; but if your report is of "simple list" type and uses only one datasource, all remaining 9 datasources will never be filled with data.

Leave a Comment