Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Subreport to write-back to a source database

Status
Not open for further replies.

ker0k3n0

Technical User
Apr 19, 2010
18
US
Hello all,
I use Crystal Report 2008 & Oracle 10g. I have a report that pull RECCODE and RECVALUE based on ProjectID from table FT_PROJECT_RECOMMEND.

My book says I can make on-demand subreport that when user click on it, it will update my source database. I try this but my SQL command is causing an error:

UPDATE "FT_PROJECT_RECOMMEND" SET
"FT_PROJECT_RECOMMEND"."RECCODE" = 'F' WHERE
("FT_PROJECT_RECOMMEND"."PROJECTID" = 'P00000077339' AND "FT_PROJECT_RECOMMEND"."RECCODE" = 'REC000033524');
SELECT * FROM "FT_PROJECT_RECOMMEND";

Can you please help me?
 
I just tried to insert a recordset and it works:

INSERT INTO "FT_PROJECT_RECOMMEND" VALUES ('P00000077706','REC000033522','T')
How do I make crystal to lookup the ProjectID and Reccode from the report?

 
What specific error are you getting? Does the user ID the report is running under have access to update data? For example, we use a single read-only ID for all of our reports so we would not be able to update data from that login.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
I got an error with "invalid syntax" or invalid characters. I do have read/write access i was able to update the values when I hardcode them in the SQL command. I just do not know how to relate my crystal report field or my group field to the SQL command yet. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top