>Hi all
>
>I have these views with parameters specified in them, whenever they are opened they ask for the relevant parameter value.
>
>Now could I pass (or rather not pass) a parameter and the view returns all the records. Currently not passing a parameters returns a blank view.
At the end there would be a value. But design it so that it includes all when it gets an empty value. ie:
For character :
myField = ?cValue
vs:
myField between ?cValue1 and ?cValue2
store 'Bhavbhuti' to m.cValue1, m.cValue2 && would return single
m.cValue1 = ''
m.cValue2 = chr(255) && would return all
If ansi is off :
myField = ?cValue && would return all for m.cValue = ''
For numeric :
between ?nVal1 and ?nVal2
and put possible lowest/highest values for all.
Alternatively I create temp cursors as join cursors and put values I want to be included in them. This approach lets me to pickup values that I can't define with a continous range. If it's from a backend such as SQL server either I use a stored proc or create a temp table to join in SQL server or use OpenRowSet() to use my local table as a join table.
Cetin