Results 1 to 4 of 4

Thread: Crystal report & VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    5
    In my VB6 application a user can show an article from a database. With this information he also sees a picture(.jpg) of the article. What my customer wants is giving the user the opportunity to print this .jpg.

    What I want is printing this via crystal reports. I do know
    how to place a picture object on a report but this is a
    fixed path. HOW can I do this via VB6 ??. SO I pass
    the correct path to crystal reports for this picture from VB. HOW... please help me.
    PeterX

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    Is your report integrated in your VB App (report designer?)
    or is independent file?

    In the first case you can change the path of the pic in run time. (if this is your case i can help you!)

    If it is an independent file you'd better put the pics in your database.




  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    5
    Yes it is integrated in my VB app. so how can I change the path of the picture during run-time??

  4. #4
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    Open a new Project and add a Report:
    Code:
    'This is the code window where i put the CRViewer! 
    Private rpt as CrystalReports1 
    Private Sub Form_Load() 
       CRViewer1.ReportSource = rpt 
       CRViewer1.ViewReport 
    End Sub 
    
    'This is the code window of the report. 
    'I put a pic in the section2 of the report so i called the event: 
    Private Sub Section2_Format(ByVal pFormattingInfo As Object) 
       Set Picture1.FormattedPicture = LoadPicture("Path\file.bmp") 
    End Sub
    'Put a breakpoint in the event and in the imediate pane try this:
    ?CrystalReport1.Section2.ReportObjects.Item(1).name
    Picture1

    'The property FormattedPicture is read-only, and the only time it can be
    changed it's when the section it's being formatted...

    I HOPE THIS HELP!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width