|
-
Jan 17th, 2010, 06:15 AM
#1
Thread Starter
New Member
vb6 with crystal report 9
hi
i have 1 comobo box for name and 2 text(date_from , date_to) and 1 buttun
i wont to pass aparmeter for (combox and text1 and txt2) from vb6 to crystal report 9
it must shoun in the report
name,date from.date_to,name of trane
wher i can mad conditon or qury(give the name of train for this emply between date_from and date_to )
how can i made the code
how i mae aparametrs
-
Jan 17th, 2010, 06:16 AM
#2
Thread Starter
New Member
Re: vb6 with crystal report 9
hi
i have 1 comobo box for name and 2 text(date_from , date_to) and 1 buttun
i wont to pass aparmeter for (combox and text1 and txt2) from vb6 to crystal report 9
it must shoun in the report
name,date from.date_to,name of trane
wher i can mad conditon or qury(give the name of train for this emply between date_from and date_to )
how can i made the code
how i mae aparametrs
Rate this post
-
Feb 9th, 2010, 11:32 AM
#3
PowerPoster
Re: vb6 with crystal report 9
Add teh paramters to your report.
In your VB code do something like this:
Code:
Set Report = crxApplication.OpenReport("Z:\DAD\BOLSamples.rpt", 1)
For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.ConnectionProperties("user id") = "sa"
crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
Next crxDatabaseTable
Report.PaperOrientation = crDefaultPaperOrientation
'
'----------
'parameters
'----------
'
Report.ParameterFields.ITEM(1).AddCurrentValue Trim(txtCustomer.Text)
Report.ParameterFields.ITEM(2).AddCurrentValue Trim(txtShipDate.Text)
Report.ParameterFields.ITEM(3).AddCurrentValue Trim(txtBOL.Text)
Report.ParameterFields.ITEM(4).AddCurrentValue Trim(txtShipToName.Text)
===================================================
If your question has been answered, mark the thread as [RESOLVED]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|