Click here to Skip to main content
12,700,567 members (32,713 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET

I am trying to use an updated datasource to be use in my crystal report. The crystal report datasource is vwMyView. I want to amend the contents of vwMyView and use the updated datasource to be used in the crystal report. How can I do this and what would the syntax be or is there a better way of doing this. Below is my code, what should I add. Help

Public sub PossibleEmployeeSalary

        Dim adoCmd As New SqlClient.SqlCommand
        Dim adoRdr As SqlDataReader
        Dim cryRpt As New ReportDocument

            adoCmd.Connection = adoConn
            adoCmd.CommandType = CommandType.Text
            adoCmd.CommandText = "SELECT * FROM vwMyView"       

            While adoRdr.Read()
                adoRdr("Salary")  =  adoRdr("Salary")   * 0.05
                adoRdr("Surname") =  adoRdr("Surname")
            End While


        Catch ex As Exception

        End Try

    End Sub
Posted 15-Jan-13 5:55am
Updated 15-Jan-13 6:03am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

add two lines before refreshing...


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100