VB Data Report and accessing controls at run-time 
Author Message
 VB Data Report and accessing controls at run-time

How do you access controls such as a label at run-time on VB's data
report?  I expected it to be the same as a VB form, but that doesn't
seem to be the case.  ex.  DataReport.Label.Caption="Caption" doesn't
work.

Thank you!

Tom Hamlyn

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 27 Jan 2003 03:00:00 GMT  
 VB Data Report and accessing controls at run-time

Quote:

> How do you access controls such as a label at run-time on VB's data
> report?  I expected it to be the same as a VB form, but that doesn't
> seem to be the case.  ex.  DataReport.Label.Caption="Caption" doesn't
> work.

  I've posted on this topic so you can try deja news for exact syntax, which
don't have handy here.  The trick is that you must refer to the RptLabel
control in a roundabout way, via the Collections of which it is a member -
don't blame me, this is MS's poor development of the DataReport before
putting it into production.  The syntax would be something like:

DataReport.Sections("ReportHeader").Controls.Item("Label3").Caption = "Hello
world"

...this is off top o'me head so see deja for my past posts which were taken
from code I had tested.  Oh yeh, you also gotta know that setting label
Caption must be done before you Show the report;  once report is vsible you
can't change its labels as you can with a form.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"
 ((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))



Mon, 27 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MNS VB 6.0 Data Environment and Data Report Run time problem

2. Data Environment / Data Report / Changing database file at run time

3. Run-time error - 20534 : VB 4 data access

4. ADO Data Control - Design Time/Run Time database locations

5. Access queries run from VB gobbling 10 times the disk spaces as when run locally

6. Updating Crystal Report data at run time.

7. Data Report Designer - Creating Hierarchy at Run Time

8. Newbie- DataEnvir./Data Report run time question

9. VB6 Data Report run time update

10. Help: VB6 Data Report - Assign Run-time Label Caption

11. Help: VB6 Data Report - Assign Run-time Label Caption

12. Updating Crystal Report data at run time

 

 
Powered by phpBB® Forum Software