Hi
I have created a report and created parameters. Date From, Date To, Reference
One of the parameters is a reference code which I have in a class collection and set the parameter datasource to be this.
this work fine but only allows me to select one reference at a time and the user may want to display all references.
E.g. All references between 2 dates. is this Possible?
The code below is what I use.
I have a function that opens the database and fills the report data into a class list as per documentation. I do the same with the reference for the parameter. This way I can get all the relevant data and close he connection to SQL down. The report then uses the data in the classes
I have also tried this using the ArrayList method. This works better in that it allows me to usse all references. The problem is you can delete them and then there appears to be now way or returning the list unless you reopen the report.
Thanks
Gary
I have created a report and created parameters. Date From, Date To, Reference
One of the parameters is a reference code which I have in a class collection and set the parameter datasource to be this.
this work fine but only allows me to select one reference at a time and the user may want to display all references.
E.g. All references between 2 dates. is this Possible?
The code below is what I use.
//Now add the references to the reference class... |
while (referenceReader.Read()) |
{ |
references.Add(new References( referenceReader["Reference"].ToString())); |
} |
this.ReportParameters["Reference"].UI.AvailableValues.DataSource = references; |
this.ReportParameters["Reference"].UI.AvailableValues.DataMember = "Reference"; |
this.ReportParameters["Reference"].UI.AvailableValues.ValueMember = "Reference"; |
I have a function that opens the database and fills the report data into a class list as per documentation. I do the same with the reference for the parameter. This way I can get all the relevant data and close he connection to SQL down. The report then uses the data in the classes
List<Receipts> receipts = new List<Receipts>(); |
List<References> references = new List<References>(); |
I have also tried this using the ArrayList method. This works better in that it allows me to usse all references. The problem is you can delete them and then there appears to be now way or returning the list unless you reopen the report.
Thanks
Gary