none
vb.net issue of reporting RRS feed

  • Question

  • dear all

    i am using crystal reports and vb.net

    whenever user or i as developer open crystal report, it ask for user and password. my code that i am using in vb.net is below. how can i disable it 

        Dim cryRpt As New ReportDocument
            cryRpt.Load("\\192.168.1.150\Bashir Impex Files\Department Folders\IT\cpv.rpt")
    
            Dim crParameterFieldDefinitions As ParameterFieldDefinitions
            Dim crParameterFieldDefinition As ParameterFieldDefinition
            Dim crParameterValues As New ParameterValues
            Dim crParameterDiscreteValue As New ParameterDiscreteValue
    
            crParameterDiscreteValue.Value = TextBox2.Text
            crParameterFieldDefinitions = _
       cryRpt.DataDefinition.ParameterFields
            crParameterFieldDefinition = _
       crParameterFieldDefinitions.Item("cpvid")
            crParameterValues = crParameterFieldDefinition.CurrentValues
    
            crParameterValues.Clear()
            crParameterValues.Add(crParameterDiscreteValue)
            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
    
            Form5.CrystalReportViewer1.ReportSource = cryRpt
            Form5.CrystalReportViewer1.Refresh()
    
            Form5.Show()

    Tuesday, June 18, 2019 12:00 PM

Answers

  • problem solved by adding one line to code

     cryRpt.SetDatabaseLogon(user, pwd)

    • Marked as answer by Omi4u Tuesday, June 18, 2019 12:12 PM
    Tuesday, June 18, 2019 12:12 PM