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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Findings with DetachContent() Method

Status
Not open for further replies.

abhijitkolhatkar

Programmer
Dec 12, 2005
21
HK
Hi All,
I am creating a simple report which displays details of Orders.
There are three categories of orders

Bulk Scheduled
Regular Scheduled
AdHoc

The layout of the report is as below:
For every customer, three rows will be displayed, one for each category.
The customer name, is displayed at the same level of the details and not as Group Header or something..
Here is a sample:

Customer Name Order Cat Sold Booked

ABC Cust Bulk S 1 1
ABC Cust Regular S 2 9
ABC Cust AdHoc 4 11

How I want it to be displayed is:

Customer Name Order Cat Sold Booked

ABC Cust Bulk S 1 1
Regular S 2 9
AdHoc 4 11


Now,
I used DetachContent(CustmerNameControl), to detach the Customer Name control for 2 out of the three row.
Followig is my finding:
If I use DetachContent() in Start method of the frame on which this control resides, the report slows down like hell and the time taken by the report increses almost 2 time.
If I call the same method the same way in Finish method of the frame, the report works fast.

Has anybody came across with similar issue?

Thanks in advance!
Abhijit
 
How about:
- Define a global. Say flag AS integer.
- 1st report sets flag to 99 or something known.
- 1st report allows cust name to appear in control.
- All other reports test flag in OnRow() of the control.
IF flag = 99 THEN
DataValue = "" ' Space out cust name
END IF

 
Hey Milton,
Yes..even that can be done...
But the intention behind asking the question about DetachContent is not to find an alternative but to know if you guys have came across any situation like this before.

Appreciate ur comments!
Thanks!

abhijit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top