VB6: Load Picture in Data Report using code

Usually we can access each section of data report in Visual Basic 6 using code by the following manner DataReport1.sections(“head”).controls(“label1″.caption =”Total Amount”.
But this method not going to work when you want to load a custom image from your local drive.

Custom image in Data Report

You can simply do the task by following these steps
  • Place a Data Report image control on a form
  • Create an object for storing image object

Dim img
set img=DataReport1.sections(“head”).controls(“image1”)

  • Load image with LoadPicture method 


Published by


A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.