How to pass parameter value to the Dataset
hello,
i did create new parameter, "start_date_category" (which highlighted in blue color) , hardcoded 3 values ( date project logged, date advertised, on hold start date) (label , value same) "available values" in report parameter properties. above mentioned values column names in report. whenver select column name in parameter dropdown, should retrive data accordingly.these 3 values ( column names ) contains date.
till did (as per online articles), did right click on main dataset , selected dataset properties , selected query tab, click on "fx"( expression) next query. and inserted following expression:
="select [job title], [task grade], [group], department, [business unit], [line manager], [date project logged], [date advertised], [closing date], [team leader], practitioner,
[project status], comments, [ciboodle ref no/ reference number], on_hold_start_date, on_hold_end_date, [advert type], [on-hold comment],
[successful candidate], dbo.fngetbusinessdays([date project logged], [closing date], [project status]) [days fill], dbo.fngetbusinessdayshold(on_hold_start_date, on_hold_end_date) [days on hold], attachments from hr_recruitment_status where practitioner=" & "'"& join(parameters!practitioner.value,",")&"' , [group]="& "'"& join(parameters!group.value,",")&"' , [team leader]="& "'"& join(parameters!team_leader.value,",")&"' , [advert type]="& "'"& join(parameters!advert_type.value,",")&"' , [project status]="& "'"& join(parameters!status.value,",")&"'and [" ¶meters!start_date_category.value &"] between " &"'" ¶meters!date_range_start.value & "' , '" & parameters!date_range_end.value &"'"
i need multi select, that's why did use "join" ( not sure functionality), think there mistake in expression.
could please me, thanks.
hello,
sorry, code snipplet isn't readable.
anyway, shouldn't create sql statement dynamically; should use real sql parameter @para here:
select ... from ... where column = @para and ...
wizard recognize sql parameter , can assign report paramater sql parameter.
olaf helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
wenn ich denke, ist das ein fehler und das beweise ich täglich
blog xing
SQL Server > SQL Server Reporting Services, Power View
Comments
Post a Comment