Hi,
is there a way to have a fixed number of row in a table even if the datasource have only one rows?
I have an invoice report and the details must have a fixed number of row (10 in this case). If the datasource returns only 2 rows, the other 8 will be blank. In SQL Server reporting service, I achieve it by this query:
But in Telerik Reporting it is not possibel to declare variables into Query. It is an alternate way?
Thanks
is there a way to have a fixed number of row in a table even if the datasource have only one rows?
I have an invoice report and the details must have a fixed number of row (10 in this case). If the datasource returns only 2 rows, the other 8 will be blank. In SQL Server reporting service, I achieve it by this query:
DECLARE
@Empty
TABLE
(ROW_NUM
INT
);
DECLARE
@iCount
INT
SET
@iCount = 1
WHILE @iCount<=10
BEGIN
INSERT
INTO
@Empty
VALUES
(@iCount)
SET
@iCount = @iCount + 1
END
SELECT
DETTAGLI.*
FROM
@Empty RF
LEFT
OUTER
JOIN
(
SELECT
ROW_NUMBER() OVER (
ORDER
BY
SEQ)
AS
RIGA,
FD.SEQ,
UM.CODICE
AS
UM,
FD.PREZZO,
FD.QUANTITA,
FD.IMPORTO,
FD.DESCRIZIONE,
I.DESCRIZIONE
AS
DESC_IVA,
I.ALIQUOTA,
I.CODICE
AS
CODICE_IVA
FROM
vend.T_FATTURE_DETTAGLIO FD
INNER
JOIN
cont.T_ALIQUOTE_IVA I
ON
I.ID_ALIQUOTA = FD.ALIQUOTA_IVA_ID
INNER
JOIN
magaz.T_ARTICOLI ART
ON
ART.ID_ARTICOLO = FD.ARTICOLO_ID
LEFT
OUTER
JOIN
anag.T_UM UM
ON
UM.ID_UM = ART.UM_ID
WHERE
FATTURA_ID = @prmIDFattura
) DETTAGLI
ON
DETTAGLI.RIGA = RF.ROW_NUM
But in Telerik Reporting it is not possibel to declare variables into Query. It is an alternate way?
Thanks