I'm designing a event tracking report where you provide the event number to the report through a parameter, which then gets the corresponding event data.
This then has to use the previous event number that was retrieved by said event number to get the next lot of event data and so on until it reaches a event that has a previous event number of 'NA' meaning no more events.
So my question is how can i achieve this within crystal reports?
I was using a parameter that could hold the multiple event numbers that resulted from a tracking search with in visual basic, and that worked fine, but i now realize that with another report that i have to produce with multiple starting events that all have to be tracked in the one report.
For this i was just going to use a sub report within the details section but because i don't know how many sub reports would have to be produced i can't allow for enough parameters to pass the list of events in the way i was previously doing it, thus i have to let the report do the tracking for me.
Google hasn't returned anything that would provide a solution to this problem, so any help would be gladly recieved
With the final record count, or in this case events being unknown, Crystal will have a hard time doing what you want. Handling Previous vs. Current can get complicated and confusing.
I would suggest instead to use a parameterized Query in Access. Then you can pass the Event Number and have a loop to bring back all the events to the beginning.
The database will have more features to get the first and last events, count the number of events and return the records to you.
Then you can use Crystal to format the report.
I have decided to use a dataset for this where i populate it with all the events with all their traces and give each set of traced events a number, then in crystal load this dataset and group by the trace number and sort my the event number to get them in order.
This should give me the required output, but I'm having trouble implementing the dataset with crystal reports, i have maked a strongly typed dataset and populated it with columns, then get all the data for the traces and add that to a dataset using the strongly typed dataset as a template.
Then create the report as an object and assign the report source as the dataset and pass it to the crystal report viewer
Unfortunately this does not have any resulting data produced on the crystal report
Dim objRpt = New Trace_Report
.CrystalReportViewer1.ParameterFieldInfo = paramFields
.CrystalReportViewer1.ReportSource = objRpt
.WindowState = FormWindowState.Maximized