VB Crystal Report >> vb6 cr9 report with photos

by teo » Mon, 09 May 2005 21:02:56 GMT


Hello. I am working on a customer services application. I need t
produce a report that will print out any digital photos associated to
customer service problem. I am using VB6 and Crystal Reports 9. Th
report is an external report and I am using within the VB code
Section variable to catch the section format event. To dynamically loa
the image into the Image object on the report (on the details section
The problem I have is that the photo can have different sizes and
cannot get the image control accommodate any big photo (width an
height bigger than A4) does any one knows if in cr9 image control I ca
get to behave like the vb6 image control with it stretch property t
make the photo shrink to fit the size of the image control? (I got i
working ok if the photo is actually smaller than A4 page I get the siz
of the picture and resize the control prior loading the image)
Many thank in advance. In the meantime Il continue pulling my hair


-
te
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------



Similar Threads

1. Insert Photo & Photo Name - Word VBA

2. Printing photos in report created with VB 2008

Hello everybody.

I need help to resolve my problem.
I whant to print documentation about products stored in my SqlServer DB.
All informations about each product are in fileds in my DB, but the picture 
of each product are stored in JPG format in another server. Only the path and 
the name of picture are stored in DB for each product in one field named 
ImageArticle.
In my reportviewer i can see each field information but i never see the 
picture.

Please someone can help me

3. Data Report with Photo - Visual Basic/VB

4. Urgent Problem:Cr9 sp2 and vanishing main report params

Hi

We have old crystal reports which were upgraded to 9 and then to oledb.These reports also contai
sub reports. Both the main report and sub reports have parameters

It appears that the old report seems to loosed the fact it has parameters on the main report and just finds the sub reports ones. When i create a brand new xstal report it finds the main reports parameters
The code that sets the parameters is included and has been working for well over a year. Has any one experienced this problem as I dont want to relayout out etc all the reports

Private Sub setReportParams(ByRef p_objReport As CrystalDecisions.CrystalReports.Engine.ReportDocument, 
                                ByVal p_cIgnoreVars As String, 
                                ByVal p_lUseDs As Boolean

        Dim lnIndex As Integer = 
        Dim lnRptParams As Integer = 
        Dim lcParamName As String = "
        Dim lcParamValue As String = "
        Dim blnContinue As Boolean = Tru

        Dim paramField As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitio
        Dim crParamValues As New CrystalDecisions.Shared.ParameterValue
        Dim crParameterDiscreteValue As CrystalDecisions.Shared.ParameterDiscreteValu

        Tr

            ' get number of params on repor

            lnRptParams = p_objReport.DataDefinition.ParameterFields.Count - 
            ' scan through param item
            For lnIndex = 0 To lnRptParam
                ' get paramnam

                paramField = p_objReport.DataDefinition.ParameterFields.Item(lnIndex
                lcParamName = paramField.Nam

                If Len(p_cIgnoreVars) <> 0 AndAlso InStr(lcParamName, p_cIgnoreVars) <> 0 The
                    blnContinue = Fals
                Els
                    blnContinue = Tru
                End I

                If blnContinue The
                    ' get value of parameter passed in UR
                    ' parameter name shopuld be same as report parameter nam
                    lcParamValue = getArParamValue(lcParamName

                    ' set the report parameter valu

                    'get the reference to the current value
                    crParamValues = p_objReport.DataDefinition.ParameterFields(lcParamName).CurrentValues(

                    'initialize (just in case you need more than one value to pass in, you may need to loop in here
                    crParameterDiscreteValue = Nothin

                    'Set the current values for the parameter fiel
                    crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValu

                    Select Case paramField.ParameterValueKin
                        Case CrystalDecisions.[Shared].ParameterValueKind.NumberParameter.NumberParamete
                            If lcParamValue.Length = 0 The
                                crParameterDiscreteValue.Value = 
                            Els
                                crParameterDiscreteValue.Value = CInt(lcParamValue
                            End I
                        Case CrystalDecisions.[Shared].ParameterValueKind.DateParameter   ' DateParamete
                            crParameterDiscreteValue.Value = CDate(lcParamValue
                        Case CrystalDecisions.[Shared].ParameterValueKind.StringParameter   ' StringParamete
                            crParameterDiscreteValue.Value = lcParamValu
                        Case CrystalDecisions.Shared.ParameterValueKind.DateTimeParameter  ' DateTimeParamete
                            crParameterDiscreteValue.Value = CDate(lcParamValue
                        Case CrystalDecisions.[Shared].ParameterValueKind.BooleanParamete
                            crParameterDiscreteValue.Value = CBool(lcParamValue
                        Case CrystalDecisions.[Shared].ParameterValueKind.CurrencyParamete
                            If lcParamValue.Length = 0 The
                                crParameterDiscreteValue.Value = 
                            Els
                                crParameterDiscreteValue.Value = CDbl(lcParamValue
                            End If
                    End Select


                    ' if footer is used in report
                    'Automatically set if no parameter passed in
                    Select Case lcParamName.ToLower
                        Case "@owner"
                            If lcParamValue.Length = 0 Then
                                crParameterDiscreteValue.Value = RPT_DISCOWNER
                            End If
                        Case "@groupid"
                            If lcParamValue.Length = 0 Then
                                crParameterDiscreteValue.Value = RPT_DISCGROUP
                            End If
                    End Select

                    'add to to the collection
                    crParamValues.Add(crParameterDiscreteValue)

                    'refresh the report.
                    p_objReport.DataDefinition.ParameterFields(lcParamName).ApplyCurrentValues(crParamValues)

                End If

            Next

        Catch ex As Exception
            setStatusMsg(ex.Message)
        End Try





5. SAME params fail or succeed when calling CR9 report - VB Crystal Report

6. How to reach report fields in CR9?

Let's say we have 150 fields into the table. We can use
     Rpt.Database.Tables("Table1").Fields
to reach table fields. But if only 10 are choosen for the report. 
How to reach them? 
Thanks.
Eugene

7. Passing paramter to CR9 report - VB Crystal Report

8. Reporting in columns CR9

Hi all,

I am currently trying to create a report to display the results of analysis
on samples for each customer. It is structured as this:
One customer can have many samples
Each sample can have many analysis

Due to all the info I need for each sample in the report I would like to
print it in columns like shown below:

Customername
Address etc.

Samples:
1: Drinking water, chlorinated, bla bla etc...
2: Beer, well tasting Norwegian bitter
3: Pool water, dirty as hell
4: Another sample
5: Last one for this table, move to next

Results of analysis:
Sample:     1        2        3        4        5
---------------------------------------
Particles    0        5        1        2        7
Smell        1        6        2        2        5
Taste        3        2        1        2        1
---------------------------------------

6: Some other sample
7: This too
8: And this

Results of analysis:
Sample:     6        7        8
--------------------------
Particles    0        5        1
Smell        1        6        2
Taste        3        2        1
--------------------------


I am not interrested in totals or anything, just the results of the analysis
for each sample. Tried using Cross-tab with little luck...

I have created a nice report for reporting in rows, but when it's many
samples, it takes a whole rain forest to print... That report is grouped on
customer+sample, and the analysis are listed in detail section.

Any advice?

Best regards,

Roy Markussen
Norway