Click to See Complete Forum and Search --> : Reporting with Data Reports
Martin Sequeira
Oct 28th, 2002, 05:08 AM
I'm using VB's data report writer for building up my reports.I have few problesms while working with them
1) The refresh data is never displayed in the report .Only when i close the application and again execute the report,the latest changes are visible.In short whatever changes I do through my data entry programme in the application,I cannot see them subsequently through my report.How do I overcome this problem?
2) I cannot pass the form parameters to the Report .What's the way to send them and retrieve in the report?
Regards
Martin Sequeira
Lordak
Oct 28th, 2002, 10:46 AM
About refreshing, you have to keep in mind that the datareport's internal recordset fills on datareports load, so if you make any changes in the data it will not be visible until you 'recharge' the recordset that is used as source for the report.
In order to see the 'fresh' data in your datareport, you'll have to refresh THE SOURCE from the data comes just before display the datareport.
2) What are you trying to say?
eimroda
Oct 28th, 2002, 10:28 PM
Suppose your DataSource is de1 specifically Command1:
If de1.rsCommand1.State = adStateOpen then de1.rsCommand1.Close
de1.Command1 'or de1.rsCommand1.Open
DataReport1.Show
Please tell me if it works... :)
Manny Somarriba
Oct 28th, 2002, 10:43 PM
There are some posibility that you save the data, this hapend when you create the report. I think that you need to discharge the data in order to refresh a new report. There is some information on the crystal help menu "for developer' take a look on this "discharge data", ok Amigo
Hasta la vista
tdmorris
Oct 30th, 2002, 07:03 PM
Martin,
Following is the code that I use to refresh (and print) a calendar data report after users have specified parameters for the report:
------
Private Sub Command1_Click()
deCalendar.rscmdCalendarList.Open
deCalendar.rscmdCalendarList.Requery
rptCalendar.Refresh
rptCalendar.PrintReport
deCalendar.rscmdCalendarList.Close
End Sub
------
deCalendar is the data environment
rptCalendar is the data report
cmdCalendarList is a data member of deCalendar
rscmdCaledarList is a record set property of deCalendar
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.