Advertisement

04.07.2004 at 01:42PM PDT, ID: 20947026
[x]
Attachment Details

SQL Crystal Vb Question

Asked by tdogg31212 in Databases Miscellaneous

I am trying to run a crystal report and I am running into some problems.
I am not sure if I am filling the report correctly or whats. Since my sql statement is not straight out of the box, I think I am calling the wrong information.

Can someone please help me??

Thanks


My code:

        Dim MyReport As New LendingTreed 'my crystal report
        Dim MyCommand As New SqlCommand
        Dim myDA As New SqlDataAdapter
        Dim myDS As New Dataset  
        '''
        Dim Connection As New SqlConnection("server=xxx;database=xxx;uid=sa;password=xxx;")
        MyCommand.Connection = Connection

        MyCommand.CommandText = "select * " & _
                                "from northwind..lendingtree lt " & _
                                "where not exists ( " & _
                                "Select g.borrow_ssn " & _
                                "from gen g  " & _
                                "where g.borrow_ssn = lt.ConsumerSSN) " & _
                                "and lt.status like '%Funded%'  " & _
                                "order by  lt.ConsumerSSN "

        MyCommand.CommandType = CommandType.Text

        myDA.SelectCommand = MyCommand

        myDA.Fill(myDS.Tables(0))
        MyReport.SetDataSource(myDS)

        CrystalReportViewer1.ReportSource = MyReport
Start Free Trial
[+][-]04.12.2004 at 08:06AM PDT, ID: 10805843

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Databases Miscellaneous
Sign Up Now!
Solution Provided By: MrDeveloper
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.13.2004 at 10:59AM PDT, ID: 11061711

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.17.2004 at 03:29PM PDT, ID: 11093703

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32