Editing Crystal Report at Runtime

gopal2006

Well-known member
Joined
Feb 1, 2006
Messages
63
Programming Experience
1-3
How can I edit crystal report at runtime? i.e. to edit the values in the report when we actually run the report i.e preview:confused:
 
I don't think you are going to get the answer you are looking for. Editing at runtime can be done, but not by typing/over-typing on the crystal report viewer. You would have to provide some editing controls outside of the viewer and then refresh the viewer when the changes are made. If you want to edit database data, I would advise against doing it through any reports, that's what your gridforms and edit/input forms are for. Reports are for "REPORTING" data, not really for editing.
 
Crystal Report Edit

I dont want to edit any database here. Sometimes if any problem in the values at runtime at that time I wanted to edit them. I want to know about editing control which can be provided as told by you. I want to know some details about it
 
Editing controls = textboxes, grids, comboboxes, listboxes, etc..
If you really want to do it, I would stick a panel on the top or bottom of the form.
Put textboxes with the info you would like to be able to update in them and a refresh button on that panel. On the bottom of the form you would have a Crystal Reports Viewer. Show the report and fill the textboxes with the report data, allow the user to change values in the textboxes and then update the report viewer when they hit the refresh button. It's pretty much adding a report viewer to your data entry/edit form.

VB.NET:
    Private Sub Refresh_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh_Button.Click
        Dim rpt As New CrystalReport1
        CrystalReportViewer1.ReportSource = rpt
        CrystalReportViewer1.Zoom(1)
        CrystalReportViewer1.Refresh()
    End Sub

Hope that helps...
 
Back
Top