Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR Binding problems

Status
Not open for further replies.

arrian

Programmer
Nov 11, 2003
93
CA
Hi! I'm having some issues with Crystal Reports... I have a report with unbound fields. I'm trying to bind them at runtime to code from a dataset, but I'm not really sure how I should go about this. Can anyone give me some ideas? I currently have:
Code:
Dim crTES2 As New Timesheet
        Dim crTES As New rptTES
        Dim rowRows As DataRow
        Dim dsReport As DataSet
        Dim dsTest As DataSet
        Dim intKey As Integer
        Dim strTest As String
        intKey = Val(strKey)



        crvTES.ReportSource = crTES
        dsReport = Connect(2)
        dsTest = Connect("Select * from TimesheetInfo where Entry = 2")
        'dsReport = Connect("Select * from CurrentTimesheet")
        crvTES.ReportSource = crTES
        crTES.SetDataSource(dsTest)
        For Each rowRows In dsTest.Tables(0).Rows

        Next
        crTES.DataDefinition.FormulaFields("Employee").Text = "{TimesheetInfo.PayrollNum}"
        'strTest = dsTest.Tables(0).Columns("PayrollNum").ToString
        crTES.DataDefinition.FormulaFields("Employee").Text = "'" & strTest & "'"
        'crvTES.SelectionFormula = "{ShiftReport.ShiftCount} = " & Val(strKey)

        Me.ShowDialog()

The code is a little messy, as it's still got a bunch of stuff from tests I've done, but I'm really stuck here. I hope that someone here can help me out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top