troubleshooting Question

Changing image dynamically in crystal reports and vb .net 2008

Avatar of FragReaper
FragReaper asked on
Visual Basic Classic.NET Programming
5 Comments1 Solution324 ViewsLast Modified:
What I am trying to achieve here is to change an image in a crystal reports .rpt file at runtime. Currently I am using code as shown below to pass custom test to parameters. How can I pass a bitmap to the report before exporting it as a PDF?
Public Sub DataPassOfficer()
        Dim Rep As New mg11a
        Dim passedvalue As String
        passedvalue = statementbody.TextBox1.Text
        Rep.ParameterFields(0).AllowCustomValues = True
        Rep.ParameterFields(0).CurrentValues.AddValue(passedvalue)
        Rep.ParameterFields(1).AllowCustomValues = True
        Rep.ParameterFields(1).CurrentValues.AddValue(Oforename + " " + Osurname)
        Rep.ParameterFields(2).AllowCustomValues = True
        Rep.ParameterFields(2).CurrentValues.AddValue("Over 18")
Rep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "C:\temp\temp4.pdf")
   End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros