Solved

Delete a record in Crystal Reports

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

19 Experts available now in Live!

Get 1:1 Help Now