didn't work...
id changed main report parameters and remaped them again against
subreport's, still does not show me subreports, when i test each subreport
individually they work great, i guy told me that maybe the problem lies on
one parameter that contains the DATABASE name, because it has to be dynamic.
this is the data code on one of the subreports (the code is almost the same
for each subreport); as you can see, it expects 4 parameters, BASEDATOS wich
contains database name, MESF is an integer, ANOF another integer and AP wich
is a hidden-internal parameter with a single quote as a value.
the main report has the same 4 parameters but id add a 2 after the name
(BASEDATOS2, MESF2, ANOF2 and AP2), so i maped (BASEDATOS to BASEDATOS2),
(MESF to MESF2) and so on....
im still stuck on this...
declare @ANOACT CHAR(4);
declare @MESACT CHAR(2);
declare @MESESC VARCHAR(300),@MESESA VARCHAR(300);
declare @MESESC1 VARCHAR(300),@MESESA1 VARCHAR(300);
declare @INCREMENT INT,@INC char(2);
SET @MESACT=CONVERT(char(2),@MESF)
SET @ANOACT=CONVERT(char(4),@ANOF)
IF @MESF < 10
begin
SET @MESACT='0' +RTRIM(LTRIM(@MESACT))
end
SET @MESESC='s.c01'
SET @MESESA='s.a01'
SET @INCREMENT=2
WHILE @INCREMENT <= @MESF
BEGIN
SET @INC=CONVERT(char(2),@INCREMENT)
IF @INCREMENT < 10
begin
SET @MESESC=@MESESC+'+s.c0' +RTRIM(LTRIM(@INC))
SET @MESESA=@MESESA+'+s.a0' +RTRIM(LTRIM(@INC))
end
else
begin
SET @MESESC=@MESESC+'+s.c' +RTRIM(LTRIM(@INC))
SET @MESESA=@MESESA+'+s.a' +RTRIM(LTRIM(@INC))
end
SET @INCREMENT=@INCREMENT+1
END
exec('Select c.Nombrecuenta,c.Codigotipocuenta,t.Nombretipocuenta,'+
'(s.SaldoInicial+(CASE when c.Naturaleza='+@AP+'D'+@AP+' then
(('+@MESESC+')-('+@MESESA+')) else (('+
@MESESA+')-('+@MESESC+')) end)) as Saldo'+
' from '+@BASEDATOS+'.dbo.cnt_saldos s'+
' inner join Grupovilla.dbo.CuentasContables c on
s.id_cuentascontables=c.id_cuentascontables'+
' inner join Grupovilla.dbo.TiposdeCuenta t on
c.codigotipocuenta=t.codigotipocuenta '+
' where c.nivel = 1 and LEFT(c.codigotipocuenta,1)='+@AP+'A'+@AP+' order by
c.codigotipocuenta,c.cta')
[quoted text, click to view] "Bruce L-C [MVP]" <bruce_lcNOSPAM@hotmail.com> wrote in message
news:uU83tZkcHHA.4388@TK2MSFTNGP05.phx.gbl...
>I didn't think it should be a problem having them the same. Try changing
>the main report parameters and then map it.
>
> And no, you don't have to have any data in the main report.
>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Willo" <willoberto@yahoo.com.mx> wrote in message
> news:u1zT5GkcHHA.4516@TK2MSFTNGP04.phx.gbl...
>> do you think the parameter names are the problem?.. (they are the same on
>> the main report and subreports)
>>
>> i did map the subreport's parameters to main report's parameters
>>
>> another question:
>> main report does not have any data, im just using it to concentrate the
>> subreports
>>
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@hotmail.com> wrote in message
>> news:O$dDV9jcHHA.5044@TK2MSFTNGP05.phx.gbl...
>>> As far as I can tell you have it correct.
>>> Do these steps:
>>> 1. Create each report that will be a sub report and test it on its own
>>> 2. Drag and drop onto a report with the parameters that you want
>>> 3. Right mouse click on the subreport and map the parameters.
>>>
>>> This should work without a problem.
>>>
>>>
>>> --
>>> Bruce Loehle-Conger
>>> MVP SQL Server Reporting Services
>>>
>>> "Willo" <willoberto@yahoo.com.mx> wrote in message
>>> news:%23b1LcwjcHHA.1240@TK2MSFTNGP04.phx.gbl...
>>>> Hi;
>>>>
>>>> i dont know if this is possible; i have 3 reports and each report has 4
>>>> parameters (parameters names are the same between them).
>>>>
>>>> i want to integrate those 3 reports on one single report, I BELIVE
>>>> that i need to declare the parameters on the main report and link
>>>> subreport's parameters with main report's parameters (im correct?);
>>>> anyway i did that already, but subreports dont display, any sugestions?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>