Re: Parameter "Available Values" using Object Provider
Data Dynamics Reports Support
Parameter "Available Values" using Object Provider
08-08-2010, 12:48 AM
I'm using DataDynamics reports as to load my data sets using the Object provider as discussed here:
http://www.datadynamics.com/Help/ddReports/ddrconDataSetAndObjectDataSource.html
I've got my LocateDataSource event wired up, and that's all working great for loading datasets to fill the report.
However, I need to load datasets that are to be used for getting available values for my parameters. I've got the report runtime loaded up, and the parameters are loaded in memory, but the "LocateDataSource" event is never triggered.
When we're using a SQL datasource, all of the available values are loading fine. I would expect the LocateDataSource event to have been called to populate these datasources for Available Values with the object provider, but it is not.
Is there something I'm missing? Can I manually cause these datasets to be populated with object data?
Re: Parameter "Available Values" using Object Provider
08-08-2010, 9:11 PM
Hello,
Could you please explain-
Do you expect that the available values list appears on the parameters panel of the windows-based report preview control?
Do you expect that the available values list appears on the parameters panel of the web-based report preview control?
Or you use the code that initializes and renders the report runtime to one of the supported format and expect that ReportRuntime.Parameters["paramName"].ValidValues contains the list of the available values?
Sergey Abakumoff
GrapeCity
Re: Parameter "Available Values" using Object Provider
08-08-2010, 9:28 PM
Thanks for the response, Sergey.
The specific scenario I am working with in my application is that I start up a report runtime for the report definition, and display custom controls inside my application that allow the user to choose from the list of available values. These values are populated from ReportRuntime.Parameters["paramName"].ValidValues.
However, just to eliminate our own application context as a factor, I have tried allowing the Report Runtime to populate the report parameters from the parameters panel in the windows-based report viewer control, and still never get the expected firing of the LocateDataSource event.
So, to answer your question, I suppose I would expect to have the LocateDataSource event fire for any of the three scenarios you mentioned, and have any available values that are dependent upon a dataset trigger the runtime to populate that dataset.
Instead, I am never seeing that these datasets (that have dependent parameters) are populated for an Object Provider. The LocateDataSource event never fires to populate the available values for the dependent parameters.
Re: Parameter "Available Values" using Object Provider
08-08-2010, 9:47 PM
Hello,
Thanks for the clarification.
Unfortunately there are some bugs in our product that prevent the scenario you described to be accomplished. We'll add the change request to address that problem shortly and update this thread with more information.
Fortunately there is work-around you might want to use : I suppose that the routine that creates the data to be passed in LocateDataSource handler is available in the code that starts up the report runtime for the report definition. If so, then you can modify the report definition at run-time by adding the available values to the report definition parameters, for example:
ReportDefinition def = new ReportDefinition(new FileInfo(@"c:\downloads\report1.rdlx"));
foreach(BusinessObject obj in BusinessObjectCollection)
{
ParameterValue v = new ParameterValue();
v.Value = obj.BusinessValue;
v.Label = obj.BusinessValue;
def.Report.ReportParameters[0].ValidValues.ParameterValues.Add(v);
}
where BusinessObjectCollection is what is passed in LocateDataSource handler, BusinessObject is the object that has the properties(BusinessValue in my sampe) which are mapped to the parameter value.
HTH
Sergey Abakumoff
GrapeCity
Re: Parameter "Available Values" using Object Provider
08-09-2010, 9:08 AM
Thanks for the quick response, Sergey.
Thanks for the work around. I think that could work for us until a permanent solution is in place. And thanks for submitting the change request. I'm very much looking forward to seeing the permanent fix for the bugs in place.
Re: Parameter "Available Values" using Object Provider
05-16-2011, 2:27 PM
Has this bug been fixed? Can I now hook up a DataSource for my parameters?
Re: Parameter "Available Values" using Object Provider
05-17-2011, 6:57 AM
Hello,
Case 148920 entered for this issue has been fixed in an interim build. The fix should be available in the next release of the product.
Regards,
Prantik