SimonPetherick
Technical User
I have a report that includes the following in the selection criteria:
{DATA_VALUES.READING_DATE} > DateTimeValue({?Start Gas Day},Time(06,00,00)) and
if (DateDiff ("d",{?Start Gas Day} ,{?End Gas Day} ) > 92) then
{DATA_VALUES.READING_DATE}<= DateTimeValue({?Start Gas Day}+92,Time(06,00,00)) else
{DATA_VALUES.READING_DATE}<= DateTimeValue({?End Gas Day}+1,Time(06,00,00)) and
if {?Data Type} = "Volume (m3)" then {DATA_POINTS.DTY_ID} in [148.00, 206.00, 245.00, 40.00, 80.00] else
{DATA_POINTS.DTY_ID} in [126.00,240.00,44.00,9.00] and
{SITES.SITE_NAME} = {?Customer}
The report allows the customer to select a customer from a list and also other parameters like data type (energy, volume) and data interval (hourly, daily, monthly). When they select the gas day range, I need to put a limit on the amount of data that they retrieve. The above, displays only the data up to a maximum of 92 days in total. However when I run the report if I've selected a date range over a year, it still looks like its retrieving all the data for that year (although only displaying it for the maximum of 92 days). Is there a way I can stop all the data coming back when the user selects ridiculous date ranges?
Thanks...
{DATA_VALUES.READING_DATE} > DateTimeValue({?Start Gas Day},Time(06,00,00)) and
if (DateDiff ("d",{?Start Gas Day} ,{?End Gas Day} ) > 92) then
{DATA_VALUES.READING_DATE}<= DateTimeValue({?Start Gas Day}+92,Time(06,00,00)) else
{DATA_VALUES.READING_DATE}<= DateTimeValue({?End Gas Day}+1,Time(06,00,00)) and
if {?Data Type} = "Volume (m3)" then {DATA_POINTS.DTY_ID} in [148.00, 206.00, 245.00, 40.00, 80.00] else
{DATA_POINTS.DTY_ID} in [126.00,240.00,44.00,9.00] and
{SITES.SITE_NAME} = {?Customer}
The report allows the customer to select a customer from a list and also other parameters like data type (energy, volume) and data interval (hourly, daily, monthly). When they select the gas day range, I need to put a limit on the amount of data that they retrieve. The above, displays only the data up to a maximum of 92 days in total. However when I run the report if I've selected a date range over a year, it still looks like its retrieving all the data for that year (although only displaying it for the maximum of 92 days). Is there a way I can stop all the data coming back when the user selects ridiculous date ranges?
Thanks...