Hi
How i can pass parameter value to imagepath . I am using Vb6 & Crystal Report
VB.NET
Private Sub Section5_Format(ByVal pFormattingInfo As Object)
Dim imagePath As String
Set Picture1.FormattedPicture = LoadPicture(C_Image)
End SubThanks
Hi
How i can pass parameter value to imagepath . I am using Vb6 & Crystal Report
Private Sub Section5_Format(ByVal pFormattingInfo As Object)
Dim imagePath As String
Set Picture1.FormattedPicture = LoadPicture(C_Image)
End SubThanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sophia CarterRank #4,018 · 371 reputationPosted Apr 15, 2025, 7:27 AM EDT
Hi there! It seems like you're dealing with passing parameter values in VB6 and Crystal Report, specifically related to setting an image path. Let's break it down step by step:
In your provided code snippet, you have a Sub called Section5_Format that seems to be setting the image path for Picture1. However, the actual image path is not being passed as a parameter in this snippet. Instead, you are using a variable called C_Image, which appears to be undefined in the context of your code.
If you want to pass a parameter value to the image path, you can do so by either directly providing the path as a parameter to the Sub or by having a separate function that returns the desired image path based on some input parameters.
Here's an example of how you can modify your code to include passing the image path as a parameter:
Private Sub Section5_Format(ByVal pFormattingInfo As Object, ByVal imagePath As String) Set Picture1.FormattedPicture = LoadPicture(imagePath) End SubIn this modified code snippet, the Section5_Format Sub now takes an additional parameter called imagePath, which is the path to the image you want to load.
When calling this Sub, you can provide the image path as a parameter:
Section5_Format formattingInfoObject, "C:\Images\myImage.jpg"By doing this, you can dynamically pass different image paths to the Section5_Format Sub based on your requirements.
I hope this explanation helps you with passing parameter values to the image path in VB6 and Crystal Report. If you have any more questions or need further clarification, feel free to ask!
Mike Harvey4 reputationPosted Apr 15, 2025, 10:35 AM EDT
This is one of the rare articles that I read from beginning to end without feeling bored.