can we edit crystal report in run time & print it???
And how to create receipt format in crystal report???
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sean StewartPosted Aug 10, 2011, 12:03 AM
Prasant JinagaPosted Aug 9, 2011, 5:05 AM
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.
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.
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
Thanks,
Prasant