My report is grouped by Region, Sector, WeeklyIntervals and area.
There are two kinds of weekly intervals - Less than Weekly and Greater than Weekly. Right now if no records are found for Less than Weekly interval the report doesn't display it at all and move on to display next greater than Weekly Interval.
I want to display the Less than Weekly Interval group header even if it is empty and display a message saying "No records found". How can I do this?
ThanksYou could force your query to return a record by eiter manually typing your SQL query in Crystal Reports (version 10 onwards) or by creating a view. You can achieve this by creating a union from your basic query to the dual "table" fetching one record, after this you suppress the detail section for the values from this fetch.
Select col1, col2, col3
from table1
where ...
union
select 'val1' col1, 'val2' col2, 'val3' col3
from dual
You mentioned that you needed the record to show for a time period less than a week, thus you must have a date field in your query and the code should look like:
Select my_date, col2, col3
from table1
where ...
union
select sysdate my_date, 'val2' col2, 'val3' col3
from dual
supposing you are sorting by my_date
- Jukka
Tuesday, February 14, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment