With the solution that we provided, you need to explicitly set the parameters in the query,
even if you want to retrieve the data without filtering and the values of the parameters are empty strings.
The query is going to fail if you don´t set those values to the parameters, with something like this:
Select * from bv_cdc where repweekcode='' and testtype='';
If you don´t want to have this obligation of setting always the parameters, there is another alternative to achieve this behaviour,
using an inputparameter on the call to your service.
On the datasource configuration, add @input_param to the original URL:
After this, create a baseview providing a valid filter to the parameter, such as '?&repweekcode=1027'
Finally, create a selection view over this new view, adding a view parameter for each parameter you want to be able to filter by.
Is important to set a default value to this view parameter that the field cannot have on the data origin,
for repweekcode can be -1, as this field never has a negative value.
You need to set the where condition on this selection view, to build the query depending on the values of the parameters.
When you pass a value to the parameter, you need to add it to the URL call, otherwise you don´t.
For example, if you want to be able to filter by repweekcode, you need to set something like this as your where condition:
bv_cdc_new.input_param = CASE WHEN (repweekcode = '-1') THEN '' ELSE ('?repweekcode='||repweekcode) END
Hope this helps!