5 pts.
 Data report in Visual Basic 6
how to change caption of datareport label at runtime

Software/Hardware used:
ASKED: March 20, 2009  9:49 AM
UPDATED: January 8, 2010  4:04 AM

Answer Wiki:
When you see the data report at design time, you see that it is divided in sections, and each section has a section number. You can see them as "Report Header (Section4)" for example. These sections are stored as an array of sections. In each section, controls may exist, and these controls are stored as an array of controls for each section. Each control has some properties, in this case, you need to change the 'caption' property. So, you need to open your datareport designer, see in what section the label you want to modify is, see in what position is this control in its section, and then modify the caption property. For example, if you want to change the caption of the first label in the 'Page Header (Section2)' section, you should do it this way: <pre>DataReport1.Sections(2).Controls(1).Caption = "My New Caption"</pre> Examle Datareport1.Sections("Section4").Controls("Label1").Caption = "You Caption here"
Last Wiki Answer Submitted:  January 8, 2010  4:04 am  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _