|
-
Feb 27th, 2006, 05:28 AM
#1
Thread Starter
Member
Passing parameters in VB
Hi,
I want to pass parameter from form to datareport.
i have written the query as follows...
select --------------- from ---------------- where trans_code=&trans
in the dataenvironment1. command.
i want to open this report by clicking on the button in the form.
pl help me.
Regards
-
Feb 27th, 2006, 06:01 AM
#2
Hyperactive Member
Re: Passing parameters in VB
VB Code:
DataEnv1.Connection1.Open
DataEnv1.Command1 (Text1.Text) ' pass parameter value here
DataReport1.Show
Regards,
CHAMPGARY 
-
Feb 27th, 2006, 06:39 AM
#3
Re: Passing parameters in VB
Moved to reporting section
-
Feb 28th, 2006, 04:43 AM
#4
Thread Starter
Member
Re: Passing parameters in VB
Hi,
Thanks for the response.
I have tried passing the parameter as above. It is working fine with the parameter having integer as datatype. i want to pass text as parameter. When i am trying to pass, it is giving the error.
In the parameter tab in dataenvironment.. what datatype to be selected when it is a text parameter.
adstr,adlongstr etc are there. i have tried with all.. but not able to pass it.
regards
Hiran
-
Mar 3rd, 2006, 05:06 AM
#5
Thread Starter
Member
Re: Passing parameters in VB
hi,
i am held up with this problem.
i have two parameters one is of interger type and one is of string type.
i am able to execute with the integer type parameter but not able to execute the report with the string data type.
in the dataenvironment, i have mentioned like this..
where a.staff_Code=? and a.salmonthyear=?
in the parameter form, i have one text box to pass staff code and combo to pass the salmonthyear which is string(varchar). i am getting error.. in the parameters tab in data environment, for salmonthyear i have define a datatype as advar and host datatype as string...
pl help me out in this issue.
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
|