Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Can Update records from Crystal Reports Post Reply Post New Topic
Author Message
venny001
Newbie
Newbie


Joined: 19 Jan 2010
Location: United States
Online Status: Offline
Posts: 2
Quote venny001 Replybullet Topic: Can Update records from Crystal Reports
     Posted: 19 Jan 2010 at 12:45pm
Hi,

I am new to the Crystal Reports, we are using SQL Server. Select Statement worked fine in "SQL Expression Fields", whereas I used update statement it didn't work.

(Update Student set "Student". "StudentName":="Crystal" where "Student"."StudentNo"=3)

Error: "Incorrect syntax near the keyword 'Update' ".

Thanks in Advance.

Venny.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 20 Jan 2010 at 7:49am
There is probably a way, probably by using a stored proc, but why would you want to?
 
Reporting is generally not a way to update data, but to report/see what the data is.  if you are changing the data, now you are responsible for the changes and the mistakes...and I would bet there will be some and once the data becomes corrupt it can be a world of hurt to correct it....But if the report just displays what is there, it is the application that needs to update the value, and it should do it correctly...but it won't be the report messing it up.  Also, remember that CR really has no facility for seeing what you have done, so if you accidently leave off the where clause in the above you won't see it until the report runs, and then until you figure out why every student is suddenly named Crystal it will keep over writing the changes that every one is doing to correct the bad data, making more work.
 
While it is possible, I think, it is generally accepted concept that you shouldn't update/change any data when running a report.
 
HTH
IP IP Logged
venny001
Newbie
Newbie


Joined: 19 Jan 2010
Location: United States
Online Status: Offline
Posts: 2
Quote venny001 Replybullet Posted: 20 Jan 2010 at 8:15am
Thanks again for the prompt reply.

I have hands on experience with JDE Reporting tool, there are in some cases eg. unions will change there rate, accounts people should run the update report to change the union rate for the jobs. I created a report in JDE but now we are using CR and the same way I would like to do that. There are so many jobs under one union and should update once. Student table was created for temp purpose. If you have more info on Stored Proc please can you share.

Thanks,
Venny.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum