?
Solved

Delete a record in Crystal Reports

Posted on 2004-08-04
7
Medium Priority
?
394 Views
Last Modified: 2010-04-23
Hey,

I have a crystal report that displays username information. In the crystal report viewer, you click next page to move on to the next record. I was wondering how can i make it so that the user can delete a record they are seeing on the form. Please help! Thanks
0
Comment
Question by:Chipwpb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Expert Comment

by:jrandallsexton
ID: 11719358
As far as I am aware, there is no way to do that.  How would you know what 'row' you have selected in the report.

I think the only way to accomplish something like that is by putting the results into a table/grid and allowing the user to delete them from there.

Just as a note, the general idea of a report is that it provides read-only access to data arranged in an intelligible manner.  Reports, while often configured to be interactive with drilldowns, are generally read-only.
0
 

Author Comment

by:Chipwpb
ID: 11719433
The thing is, ive seen it done before. Each page is a new record.
0
 
LVL 10

Expert Comment

by:Clif
ID: 11719487
Whatever you may have seen delete a record, it wasn't Crystal you were seeing.

As jrandallsexton said, Crystal Reports is strictly read-only.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 11719826
Chipwpb,

What the previous posts have said isn't completely accurate.  You *can* use Crystal to, among other things, delete records from your database.  Witness this text copied from Business Objects (owners of Crystal) website:

-----------------------------------------------------------------------------------------------------------------
Crystal Reports is not recommended as a tool to write to, update or delete from a database.
Database clients or applications designed specifically to edit databases should be used
instead. However, now that CR has full SQL functionality it is possible to write to, update
and delete from databases.
-----------------------------------------------------------------------------------------------------------------

Having said that though, I would advise 100% against doing this.  Just because something is possible doesn't mean it should be done!  Crystal is designed as a reporting tool, not as a database interface.

frodoman

0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 11719850
Chipwpb,

If you persist in doing this, one way would be to create on on-demand subreport linked to each detail record.  Your subreport could contain the sql command to delete a record.  You would have to link the subreport parameter to the main report record(s) that contain the PK for the table.

Again though, I have to advise in strongest terms not to do this.  Look for another way to accomplish whatever it is you want to do.

Cheers,

frodoman
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question