Relationship

Stimulsoft Reports.NET discussion
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Relationship

Post by Alex K. »

Hello,

As a way, you can set the 'Connect on Start' property to false for unused data sources in this report.

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Relationship

Post by jay@bplogix.com »

That works for my "built in" tables. But what if my report designer (user) adds a datasource to a database with a few tables. One of those tables may have a large number of rows (hundreds of thousands). The report designer adds that table but never actually uses the table in the report or in any relationships. Will that entire table be read into memory even if it is not actually used?

If so, then we have to train the end users to "know" how large the tables are before adding them to the report. It would be much easier if Reports just loaded the needed tables into memory automatically. Otherwise if a user is carless and points to a large table that is never even used, it could bring down a server just by running the report! Is there a way to have Reports.Net only pre-cache the tables it needs?

Thanks,
Jay
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Relationship

Post by jay@bplogix.com »

Or, is there a way I can loop thru the report definition to see what datasources are actually used in charts, data bands, relationships, etc. I guess then I can just set 'Connect on Start' property to false on the ones that are not used.

thx
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Relationship

Post by Ivan »

Hello,

[quote="jay"@bplogix.com]Or, is there a way I can loop thru the report definition to see what datasources are actually used in charts, data bands, relationships, etc. I guess then I can just set 'Connect on Start' property to false on the ones that are not used.[/quote]
You can add your own script in the BeginRender event of the report.

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Relationship

Post by jay@bplogix.com »

What would this script look for? How would it know what DataSources are used in charts, DataBands, relations, etc.?

Thanks!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Relationship

Post by Alex K. »

Hello,

It is impossible to know which data sources are used and what are not. In the script you can, before forming elements (chart, table), only connect to the required ones in this item.

Thank you.
Post Reply