Loading datasources

dannidanni Denmark
edited 6:02AM 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 6:02AM
    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 6:02AM
    Hi again
    I am sure that will optimize my "LoadData" function for the printing of a report.

    Cheers.
  • edited 6:02AM
    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

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.