#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    12

    Question Crystal Report ?


    Does any one have some tuturials or website about it ?

    I need to find the way those things works, and it's not an easy job lol. There is kinda no information anywhere about it and I don't have manuels or help in the program for it ! soo I don't even know where to start
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    12
    does that mean no one have ever worked with it ? Or people just learned it by them self ?

    The code and program, are getting me crazy. It's look simple but at the same time when I try to understand how things works and why it's do this or this I don't see how.
    `
    This is t the code that make it work. But how does it know wich database, wich tables and rows to use to build the report ???
    Code:
            'Déclaration d'une feuille frmREPORTS pour avoir accès à ses items
            Dim frmReport As New frmREPORTS()
            'Déclaration d'un objet CrystalReportViewer pour lui assigner sa source
            Dim CRviewer As CrystalDecisions.Windows.Forms.CrystalReportViewer = frmReport.CrystalReportViewer1
            'Déclaration du rapport des relevés non remis à la compagnie
            Dim RPTobj1 As New RPTreleveNonRemisAcie()
            'Déclaration du rapport des relevés effectués par mois
            Dim RPTobj2 As New RPTreleveParMois()
            'Déclaration du rapport des relevés par ville
            Dim RPTobj3 As New RPTReleveParVille()
    
            Dim oCRParamField As CrystalDecisions.Shared.ParameterField
            Dim oCRParamField2 As CrystalDecisions.Shared.ParameterField
            Dim oCrParamFields As CrystalDecisions.Shared.ParameterFields
            Dim oCrDiscreteParam As _
            CrystalDecisions.Shared.ParameterDiscreteValue
            Dim oCrDiscreteParam2 As _
            CrystalDecisions.Shared.ParameterDiscreteValue
            Dim ocrParamValues As CrystalDecisions.Shared.ParameterValues
            Dim ocrParamValues2 As CrystalDecisions.Shared.ParameterValues
    
            SetFormProperties(frmReport)
            frmReport.WindowState = FormWindowState.Maximized
    
            Select Case Report.ToLower
                Case "rptrelevenonremisacie"
                    CRviewer.ReportSource = RPTobj1
                Case "rptreleveparmois"
                    CRviewer.ReportSource = RPTobj2
                Case "rptreleveparville"
                    CRviewer.ReportSource = RPTobj3
            End Select
    
            oCrParamFields = frmReport.CrystalReportViewer1.ParameterFieldInfo
            If Report.ToLower <> "rptreleveparville" Then
                oCRParamField = oCrParamFields.Item("ParamMois")
                ocrParamValues = oCRParamField.CurrentValues
                oCrDiscreteParam = New CrystalDecisions.Shared.ParameterDiscreteValue()
                oCrDiscreteParam.Value = Mois
                ocrParamValues.Add(oCrDiscreteParam)
                oCRParamField2 = oCrParamFields.Item("ParamAnnee")
                oCrDiscreteParam = Nothing
                ocrParamValues2 = oCRParamField2.CurrentValues
                oCrDiscreteParam2 = New _
                CrystalDecisions.Shared.ParameterDiscreteValue()
                oCrDiscreteParam2.Value = Annee
                ocrParamValues2.Add(oCrDiscreteParam2)
            Else
                oCRParamField = oCrParamFields.Item("ParamVille")
                ocrParamValues = oCRParamField.CurrentValues
                oCrDiscreteParam = New CrystalDecisions.Shared.ParameterDiscreteValue()
                oCrDiscreteParam.Value = Ville
                ocrParamValues.Add(oCrDiscreteParam)
            End If
    
            frmReport.CrystalReportViewer1.ParameterFieldInfo = oCrParamFields
            frmReport.ShowDialog()

IMN logo majestic logo threadwatch logo seochat tools logo