Data report in Visual Basic 6

5 pts.
Tags:
RunTime
VB Data Report
Visual Basic
Visual Basic 6
how to change caption of datareport label at runtime

Answer Wiki

Thanks. We'll let you know when a new response is added.

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”

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following