Active Reports - Change Location Parameter to MultiSelect or All

<< Click to Display Table of Contents >>

Navigation:  Professional > Reports > Active Reports (Deprecated) >

Active Reports - Change Location Parameter to MultiSelect or All

Open the Report Data Source window (see Steps 1-2 in the help article Create an Active Report).

 

1.Change @SYS_LOC_CODE to MultiSelect in the Query text box:

 

SELECT * FROM dt_water_level WHERE facility_id =

<%@facility_id|Facility ID:|1|S%> and sys_loc_code in (select

value from fn_split('<%@sys_loc_code|Location:^select

sys_loc_code from dt_location where facility_id =

@facility_id^MultiSelect||S%>')) and measurement_date between

'<%@start_date|Date Range\Start:|1/1/2000|D%>' and

'<%@end_date|Date Range\End:|12/31/2000|D%>'

 

2.Click OK.

3.In the Report Designer main menu, click File and select Preview; a prompt will appear to select one or more locations and a date range.

4.After selecting the location(s) and the date range, click Go in the Preview menu. The report will show water levels for the location(s) within the selected date range.

 

Note: If a location is not selected, the report will be empty.

 

When finished, close the Preview window.

 

Change Location Parameter to MultiSelect or All.

 

1.Open the Report Data Source window (see Steps 1-2 in the help article Create Active Report).

2.Change the {{@SYS_LOC_CODE }}parameter in the Query text box to allow null selection:

 

declare @sys_loc_code var char(2000)

set @sys_loc_code = '<%@sys_loc_code|Location:^select

sys_loc_code from dt_location^MultiSelect||S%>'

if len(@sys_loc_code) = 0 set @sys_loc_code = null SELECT * FROM dt_water_level WHERE facility_id = <%@facility_id|Facility ID:|1|S%> and measurement_date between '<%@start_date|Date Range\Start:|1/1/2000|D%>' and '<%@end_date|Date Range\End:|12/31/2000|D%>' and (sys_loc_code in (select value from fn_split(@sys_loc_code )) or @sys_loc_code is null)

 

1.Click OK.

2.In the Report Designer main menu, click File and select Preview. A prompt will appear to select one or more locations and a date range.

3.After selecting the location(s) and the date range, click Go in the Preview menu. The report will show water levels for the location(s) within the selected date range.

4.When finished, close the Preview window.