【发布时间】:2018-05-11 14:36:19
【问题描述】:
是否有机会在报表生成器中使用可选参数?
例如:我有一个带有 3 个参数的查询
@Pa1 date
@Pa2 date
@Pa3 varchar(3)
如果我在没有通知的情况下运行查看报告,那么我收到消息:
为参数@Pa3 选择一个值(例如)
有可能吗?
我尝试使用空字段,但没有数据
select a.legajo,c.nombres,e.Descripcion,CONVERT (char(10), a.fecha, 103) as Fecha,a.hora as ENTRADA,
b.hora as SALIDA,
DATEDIFF(HOUR,a.hora,b.hora) as Horas_trabajadas,
c.hor_x_jor Horas_jornada,
DATEDIFF(HOUR,a.hora,b.hora) -hor_x_jor as Diferencia
from fichadas_in a, fichadas_out b, empleados c,sucursales d,Clasificacion e
where a.Legajo=b.Legajo
and a.fecha=b.fecha
and a.fecha between @fecha1 and @fecha2
and d.codigo=@sucursal
and a.legajo=c.legajo
and c.CCO=d.Codigo
and e.Codigo=c.Clasif
Order by a.fecha,legajo
【问题讨论】:
标签: sql-server sql-server-2008 reporting-services sql-server-2012 reportbuilder3.0