Improving existing answers a bit after starting this problem for grounding:
A ParameterField with a static list of values has these values as elements in the DefaultValues collection. The problem is that a ParameterField with a dynamic list does not have these values pre-populated, and the API does not seem to have a mechanism for requesting them.
A workaround involves using a static list instead of a dynamic one, but there may be hundreds of valid values that can change over time. If you remember that changing a report (s) is attractive, a dynamic list makes sense in this context.
In addition, using CrystalDecisions.ReportAppServer.DataDefModel.ParameterField shows the BrowseField property. BrowseField has TableAlias and Name properties that you can query using ADO.NET. However, BrowseField populated only for static parameters; when using a dynamic parameter, it is equal to zero. This is currently being documented as a “Correction Necessity” in the SAP Knowledge Base, article 2114469 .
So, once you get the name of the table and column, use ADO.NET to query the database and paste these values into the DefaultValues collection of the Dynamic parameter. Consider using a naming convention for parameters to make this easier. Perhaps use a static parameter that is not used in the report to post information about your table and columns.
source share