Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DetachFromContainer() slow down performance

Status
Not open for further replies.

sk2009

Programmer
Jul 1, 2009
2
US
I am using Actuate 8. I have a table of dynamic columns. Number of columns is different in each report. In the template, I set to max of 20 columns. I call DetachfromContainer() to get rid of the columns that do not need to display. However, recently we find out that DetachfromContainer() slows down a lot when there are many pages. I set border.pen = NullLine in start() to hide the columns instead of using DetachfromContainer(). Run time of a report of (27 pages) is now only 6 seconds instead of 1.5 minutes.

In theory, hiding the controls should have more overheads since it will still draw the empty spaces during runtime. I thought DetachfromContainer() should be a cleaner way to get rid of extra columns (apparently it is not the faster way). Wonder if anyone has more knowledge of this??

 
The way you were originally doing the report with DetachFromContainer(), the components are created, then left in the report unless you also call Abandon() on them. However, the best way to do a dynamic report is, not to create the components you don't need in the first place. Unless your database is dog slow and a lot of other things are happening, 6 seconds is waaay too long for a 27-page report. You should consider putting some timing around your database call (in OpenCursor() is the best place) to see if that's the reason your report is so slow. If not, I'd recommend creating the columns dynamically. You already know the x and y coordinates of your components, so you can override (for example) BuildFromRow( ) on the frame to create the columns you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top