我有问题。我使用这段代码:
Report report = new Report();
report.Load("sample.fpx");
report.Print();`
我看到打印对话框,单击"打印",但是不会打印文档?问题是什么?
答案 0 :(得分:0)
您应该在打印前准备报告
答案 1 :(得分:0)
使用
WITH CTE AS(
SELECT *,
Rn = ROW_NUMBER() OVER(PARTITION BY step ORDER BY id)
FROM TestTable
)
SELECT
c.id,
c.step,
valA = ISNULL(c.valA, x.valA),
valB = ISNULL(c.valB, x.valB),
c.valC
FROM CTE c
OUTER APPLY(
SELECT TOP(1) *
FROM TestTable t
WHERE
t.id > c.id
AND t.step = c.step
ORDER BY t.id
) x
WHERE
Rn = 1
OR (c.valA IS NULL OR c.valB IS NULL)
UNION ALL
SELECT
id, step, valA, valB, valC
FROM CTE
WHERE
Rn = 2
AND valA IS NOT NULL
AND valB IS NOT NULL
ORDER BY Id;
加载方法适用于模板。