borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (adapting code for form 2.0)Next Topic (Filter Record) New Topic Post Reply
AndreaVB OnLine : VB General : Passing Value to Crystal Report 8.5
Poster Resource
russell214
Level: Scholar

Registered: 02-03-2006
Posts: 32
icon Passing Value to Crystal Report 8.5

I have a field in tblHistory named "payperiod". I have put text in this field.

content of payperiod: JANUARY 1 - 15, 2006
                                JANUARY 16 - 31, 2006 and so on.

i have a SSTAB1 with 12 Tabs. each tab has a datagrid. Tab1.Caption = "January", Tab2.Caption = "February" Tab3.Caption = "March", until Tab12 = "December".

Now i want to get the report using Crystal Report for month based on SSTAB1.CAPTION.

here is my code: this will filter only the Month

Private Sub SSTab1_Click(PreviousTab As Integer)
AdoHistory.CommandType = adCmdText
AdoHistory.RecordSource = "select * from tblHistory where payperiod like '" & SSTab1.Caption & "%'"
AdoHistory.Refresh

End Sub

thanks in advance...

05-05-2006 at 07:35 AM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : Passing Value to Crystal Report 8.5
Previous Topic (adapting code for form 2.0)Next Topic (Filter Record)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder