I have a process that prepares a query for a report. My report works fine with the following:
FIND CaseMaster WHERE CaseMaster.DateFiled>=PromptData.DateBeginning AND CaseMaster.DateFiled<=PromptData.DateEnding ORDER BY CaseMaster.CaseTypeDescription,CaseMaster.DateFiled IN BATCHES OF 100000
DISPLAY DOCUMENT 'Cases Filed By Type - Detail'
PromptData is a BO I use to hold parameters for report.
I want to add another criteria to the FIND operation that will check to see if I have asked for a particular Case Type; if I have only select that Case Type, otherwise give me all case types, just like it does above.
So, I added to the FIND the following:
FIND CaseMaster WHERE (CaseMaster.DateFiled>=PromptData.DateBeginning AND CaseMaster.DateFiled<=PromptData.DateEnding AND (PromptData.CaseType IS UNDEFINED OR CaseMaster.CaseType=PromptData.CaseType) ORDER BY CaseMaster.CaseTypeDescription,CaseMaster.DateFiled IN BATCHES OF 100000
DISPLAY DOCUMENT 'Cases Filed By Type - Detail'
Shouldn't that check to see if the date range criteria is met and then look to see if one of the CaseType criteria is met?
A side issue: I really don't like having to specify IN BATCHES OF 100000. But, when I specify IN BATCHES OF 1, or just leave 'IN BATCHES OF...' off all together, I get nothing. What am I doing wrong there?
Jim