Solved

Delete a record in Crystal Reports

Posted on 2004-08-04
7
384 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
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 125 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now