kjena
asked on
problem in passing parameters to the report.
Dears,
I'v a problem in passing parameters into the report. i wrote down query in Dataenvironment as passing the item_id like this.
SELECT Date_of_purches, item_Id, SerialNo, supplier,
Issuedfor
FROM Stock_Detail
WHERE (item_Id = ?)
ORDER BY SerialNo
then pass the parameter like this
str = Combo1.Text
DataEnvironment1.command1( str)
DataReport1.show
when i run the programm it print only one time for perticular selecter item from combo box.but if second time select 4 another item or even same item it wont print. giving error like "operation is not allowed when the object is open!"
can u plz anyone give better solution 2 over come this.
jena..
I'v a problem in passing parameters into the report. i wrote down query in Dataenvironment as passing the item_id like this.
SELECT Date_of_purches, item_Id, SerialNo, supplier,
Issuedfor
FROM Stock_Detail
WHERE (item_Id = ?)
ORDER BY SerialNo
then pass the parameter like this
str = Combo1.Text
DataEnvironment1.command1(
DataReport1.show
when i run the programm it print only one time for perticular selecter item from combo box.but if second time select 4 another item or even same item it wont print. giving error like "operation is not allowed when the object is open!"
can u plz anyone give better solution 2 over come this.
jena..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Points to emoreau
Moderator, my recommended disposition is:
Accept emoreau's comment(s) as an answer.
Dan Rollins -- EE database cleanup volunteer
Accept emoreau's comment(s) as an answer.
Dan Rollins -- EE database cleanup volunteer
if DataEnvironment1.rscommand
** you are closing the recordset of the command, not the command itself
write this before you call your command.