i have a system that will search a data and print it, the problem is that everytime a search the data and shows its result when i try to view it using crystal report it shows a wrong data... the crystal report shows the very last entry that the user added and ignored the previous data.

heres my code;

Dim frm As New PClearViewer
        PClearViewer.Show()
        Dim param1Fileds As New CrystalDecisions.Shared.ParameterFields
        Dim param1Field As New CrystalDecisions.Shared.ParameterField
        Dim param1Range As New CrystalDecisions.Shared.ParameterDiscreteValue
        Dim CRYRpt1 As New PClearance_Form

        param1Field.ParameterFieldName = "xclearanceno" ' Parameter Name In Crystal Report
        param1Range.Value = txtClearanceNo.Text ' value For Parameter Field 
        param1Field.CurrentValues.Add(param1Range)
        param1Fileds.Add(param1Field) ' To add parameter in parameterslist
        PClearViewer.CrystalReportViewer1.ParameterFieldInfo = param1Fileds 'to pass parameter inf.to CRV
        PClearViewer.CrystalReportViewer1.ReportSource = CRYRpt1 ' Assign Report Source to CRV
        PClearViewer.CrystalReportViewer1.Refresh()
        PClearViewer.CrystalReportViewer1.Visible = True

by the way my crystal report contains 3 images/binary data, does it affect the crystal report? because in my other form which are all text files the code works perfectly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.