borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (can not display report 2 tables with condition)Next Topic (Printing Receipts) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : How to Display actual size(images) to oleobject in Crystal Report Solved Topic
Poster Message
aekpong
Level: Whizz Kid

Registered: 27-12-2005
Posts: 14

icon How to Display actual size(images) to oleobject in Crystal Report

Dear all
How display image(actual Size)  from pathname to Oleobject( in Crystal report (DSR) in VB6.0 . Now i can display images but after change images(image size <> oleobject size)images in report can't resize to actual size. Make resolution of image invalid

my code :
'=================================
Option Explicit
Dim Report As New CrystalReport3

Private Sub Command1_Click()
Dim Report As New CrystalReport3
  
    CommonDialog1.Action = 1
    Label1.Caption = CommonDialog1.FileName
    CRViewer91.EnableGroupTree = False
    CRViewer91.ReportSource = Report
    CRViewer91.ViewReport
    CRViewer91.Refresh
      
End Sub

Private Sub Form_Load()
    Me.WindowState = 2
    'CommonDialog1.Filter = "(*.bmp)|*.bmp|(*.xls)|*.xls|(*.doc)|*.doc|(*.jpg)|*.jpg"
    CommonDialog1.Filter = "(*.jpg)|*.jpg"
    Screen.MousePointer = vbHourglass
    CRViewer91.EnableGroupTree = False
    CRViewer91.ReportSource = Report
    CRViewer91.ViewReport
    Screen.MousePointer = vbDefault

End Sub

'=================================
'*** Crystal Report3(code) ***
Private Sub DetailSection1_Format(ByVal pFormattingInfo As Object)
    If Form4.Label1.Caption <> "" Then
        oleObj1.SetOleLocation Form4.Label1.Caption
    End If
End Sub
'=================================

please suggestion me.
Regards...


____________________________
TK

27-12-2005 at 06:53 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: How to Display actual size(images) to oleobject in Crystal Report

Basically you need to get new image's width and height, and set this size to CR picture object. Something like:

dim pic as stdpicture

set pic=loadpicture("c:\test.bmp")

oleObj1.SetOleLocation Form4.Label1.Caption

oleObj1.width=pic.Width*567/1000
oleObj1.height=pic.height*567/1000


____________________________
If you find the answer helpful, please mark this topic as solved.

21-01-2006 at 01:29 AM
View Profile Send Email to User Show All Posts | Quote Reply
aekpong
Level: Whizz Kid

Registered: 27-12-2005
Posts: 14
icon Re: How to Display actual size(images) to oleobject in Crystal Report

Goran. Thanks alot  

____________________________
TK

27-01-2006 at 10:28 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: How to Display actual size(images) to oleobject in Crystal Report

PLease mark your topic as solved...

____________________________
If you find the answer helpful, please mark this topic as solved.

27-01-2006 at 09:24 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : How to Display actual size(images) to oleobject in Crystal Report Solved Topic
Previous Topic (can not display report 2 tables with condition)Next Topic (Printing Receipts) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder