Ok, partially I solved the problem, but still have a question:
The difference between this two tools:
1. In QA: select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
2. In ADP: Report.ControlSource = CInventarioAFechaPaso7Agrupar
Report.InputParameters = @FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
When I change the reports control source at:
select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
and clean InputParameters, everything works OK, like in QA (of the time point of view, of course), so, no difference.
So far, so good.
But if I want to put params in the reports control source, like:
SELECT * FROM CInventarioAFechaPaso7Agrupar(@FechaInventario, @DesdeFabricante, @HastaFabricante, @IDFamilia, @IDMarca, @IDTienda)
the InputParameters it's change in
? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
And If I edit this line, changing in:
@FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
the line is change back in:
? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
and I have no way to avoid the manual introduction of params, to run the report.
Any explications for this? A workaround, something?
Thank's,
koci.
PS. The way that I use (and work) is assigning in code, in the reports open event, something like following:
Dim MiSQL As String
MiSQL = "select * from CInventarioAFechaPaso7Agrupar ('" & Forms!PIInventario!FechaInventario & "'," & _
Forms!PIInventario!DesdeProveedor & "," & Forms!PIInventario!HastaProveedor & "," & _
Forms!PIInventario!IDFamilia & "," & Forms!PIInventario!IDMarca & "," & Forms!PIInventario!IDTienda & ")"
Debug.Print MiSQL
Me.RecordSource = MiSQL
but this is not very elegant, because can't see the field list, for an quick development of report.
----------------------------------------------------------------------------------------------------------------------------------------
Ok, partially I solved the problem, but still have a question:
The difference between this two tools:
1. In QA:
select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
2. In ADP:
Report.ControlSource = CInventarioAFechaPaso7Agrupar
Report.InputParameters = @FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
When I change the reports control source at:
select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
and clean InputParameters, everything works OK, like in QA (of the time point of view, of course), so, no difference.
So far, so good.
But if I want to put params in the reports control source, like:
SELECT * FROM CInventarioAFechaPaso7Agrupar(@FechaInventario, @DesdeFabricante, @HastaFabricante, @IDFamilia, @IDMarca, @IDTienda)
the InputParameters it's change in:
? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
And If I edit this line, changing in:
@FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
the line is change back in:
? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
and I have no way to avoid the manual introduction of params, to run the report.
Any explications for this? A workaround, something?
Thank's,
koci.
PS. The way that I use (and work) is assigning in code, in the reports open event, something like following:
Dim MiSQL As String
MiSQL = "select * from CInventarioAFechaPaso7Agrupar ('" & Forms!PIInventario!FechaInventario & "'," & _
Forms!PIInventario!DesdeProveedor & "," & Forms!PIInventario!HastaProveedor & "," & _
Forms!PIInventario!IDFamilia & "," & Forms!PIInventario!IDMarca & "," & Forms!PIInventario!IDTienda & ")"
Debug.Print MiSQL
Me.RecordSource = MiSQL
but this is not very elegant, because can't see the field list, for an quick development of report.
.