我有一份销售订单打印报告。我有订单号参数。无论我们选择什么订单号,它都将以PDF格式打印。现在只有一个副本是打印。但我需要在PDF输出中打印两次相同的页面。 任何人都可以帮助我如何实现这一目标。
答案 0 :(得分:0)
添加数字视图,为其创建DAC,并交叉连接到它。使用公式/参数来限制 注意我发现必须显式转换为整数,否则报告解释器中的运行时错误
e.g。 SQL Server允许使用以下视图:
Create View NumberView as
-- This CTE is creating the list of numbers from 1 to POWER(POWER(POWER(POWER(2, 2), 2), 2), 2), i.e. until 65536.
WITH L0 AS
(SELECT 1 AS c
UNION ALL
SELECT 1
)
,
L1 AS
(SELECT 1 AS c
FROM L0 AS A,
L0 AS B
)
,
L2 AS
(SELECT 1 AS c
FROM L1 AS A,
L1 AS B
)
,
L3 AS
(SELECT 1 AS c
FROM L2 AS A,
L2 AS B
)
,
L4 AS
(SELECT 1 AS c
FROM L3 AS A,
L3 AS B
)
,
Numbers AS
(SELECT ROW_NUMBER() OVER(ORDER BY c) AS NUMBER
FROM L4
)
SELECT CONVERT(INT,Numbers.NUMBER) Nbr,
CONVERT(CHAR(1),'') AS TstVal
FROM Numbers
GO