Originally posted by vishwaskothari
how to use array of controls in a data report ???
Collapse
X
-
-
Originally posted by vishwaskothariIt is displaying only first record, irrespective of the condition that i am giving in command text at run time.Comment
-
Hi,
OK, u can use Parametrized, Command Type. This will refresh the Report,
First RightClick the Command Object and Change the CommandText To :
SELECT * FROM MyTable Where ID =?
And Goto Parametrs Tab:
and Change these properties:
Direction: Input
Data Type: adInteger (Select Appropriate datatype)
Host Data Type: Long /nteger, Select from list
write this code in Datareport show button:
[code=vb]
Load DataEnvironment 1
With DataEnvironment 1
If .rsCommand1.Sta te <> 0 Then .rsCommand1.Clo se
.Command1 "10"
End With
DataReport1.Ref resh
DataReport1.Sho w
[/code]
Pass the appropriate TextBox Value after Command1
This works perfect here...
REgards
VeenaComment
-
Originally posted by QVeen72Hi,
OK, u can use Parametrized, Command Type. This will refresh the Report,
First RightClick the Command Object and Change the CommandText To :
SELECT * FROM MyTable Where ID =?
And Goto Parametrs Tab:
and Change these properties:
Direction: Input
Data Type: adInteger (Select Appropriate datatype)
Host Data Type: Long /nteger, Select from list
write this code in Datareport show button:
[code=vb]
Load DataEnvironment 1
With DataEnvironment 1
If .rsCommand1.Sta te <> 0 Then .rsCommand1.Clo se
.Command1 "10"
End With
DataReport1.Ref resh
DataReport1.Sho w
[/code]
Pass the appropriate TextBox Value after Command1
This works perfect here...
REgards
Veena
hi,
First of all thanks a lot,
But
i dont get this,
where i have to write this code,
and how it will check with the condition i am giving in query.
TIAComment
-
Originally posted by vishwaskotharihi,
First of all thanks a lot,
But
i dont get this,
where i have to write this code,
and how it will check with the condition i am giving in query.
TIAComment
-
Originally posted by hariharanmcayou have to write in a VB command button which you are going to press to show the report.
hi ,
thanks
I have done exactly this, but it is giving some run time error
can u plz explain what this code is doing exactly.
Regards
VishwasComment
-
Originally posted by vishwaskotharihi ,
thanks
I have done exactly this, but it is giving some run time error
can u plz explain what this code is doing exactly.
Regards
Vishwas
Load DataEnvironment 1
With DataEnvironment 1
'Checking If Dataenvironment is opened already if yes, then it'll close
If .rsCommand1.Sta te <> 0 Then .rsCommand1.Clo se
'Passing value as string to DE1's Command1(Wait.. .., it should be rsCommand1 "10")
.Command1 "10"
End With
'Refresh The Report and show it to the user.
DataReport1.Ref resh
DataReport1.Sho w[/CODE]
I think, this will solve your problemComment
-
Comment
-
Originally posted by vishwaskothariHi,
the following statement is giving error "INVALID USE OF PROPERTY"
.rsCommand1 "10"
TIA
and also plz tell me where to give the sql query to select the records satisfying particular criteria.
for eg where i have to write this
select * from accounts where amount >1000
in command1's sql text i have written
select * from accounts where amount > ?
as told by u
TIAComment
-
If you want to display a lot of records you can use crystal reporting it is much easier than data report but u have to buy this tool.
regards,
moeComment
-
Originally posted by bigmoe00100If you want to display a lot of records you can use crystal reporting it is much easier than data report but u have to buy this tool.
regards,
moe
Of-course CR has more features.Comment
-
Originally posted by vishwaskothariand also plz tell me where to give the sql query to select the records satisfying particular criteria.
for eg where i have to write this
select * from accounts where amount >1000
in command1's sql text i have written
select * from accounts where amount > ?
as told by u
TIA
In the drop menu select properties.
Look the panel Source Of data
select the option Sql Statement.
There you can create your Sql Query.Comment
Comment