Reporting services 重复某些组和页面的SSR
我正在努力解决SSRS中的一个问题。我已经创建了一个客户发票,它在报表查看器中看起来不错,但是,它需要设置为以某种方式打印 本报告有4个主要内容Reporting services 重复某些组和页面的SSR,reporting-services,ssrs-grouping,Reporting Services,Ssrs Grouping,我正在努力解决SSRS中的一个问题。我已经创建了一个客户发票,它在报表查看器中看起来不错,但是,它需要设置为以某种方式打印 本报告有4个主要内容 页眉,如果发票详细信息+页脚不适合第一页,则需要每隔一页重复此操作 发票详细信息,如果发票详细信息和页脚不适合第一页,则需要每隔一页重复此操作 页脚,如果发票详细信息和页脚不适合第一页,则需要每隔一页重复此操作 页面背面(付款详细信息,如银行对账单),这需要在没有页眉、发票详细信息或页脚的其他页面上重复 这可能吗?如果没有,最终用户已接受发票的前3部分
提前感谢让报告的页眉和页脚在每页上重复应该很简单 现在,如果您希望在每页重复报告内容之外的其他信息,您可以执行以下操作:
您可能已经知道,使用Tablix时,可以在每个页面上重复表头行。这可以通过添加具有单列的Tablix来发挥我们的优势,并使其跨越页面的大小,在页眉和数据行中添加矩形,使其与报表正文类似。在标题行中,您可以添加希望在下一页重复的任何数据/文本 现在,由于您希望页面背面有文本,您可能不希望在每一页上重复此操作。因为页面的后面总是相同的静态数据,所以您只需按照当前设置的方式生成报表,并在报表页面之间插入静态页面即可 要完成最后一部分,可以使用以下代码:
String inputFilePath1 = @""; //back of page
String inputFilePath2 = @""; //report
String outPutFilePath = @""; //final report
PDFDocument doc1 = new PDFDocument(inputFilePath1);
PDFDocument doc2 = new PDFDocument(inputFilePath2);
// Get a page from the first document. -> back of page
PDFPage page = (PDFPage)doc1.GetPage(0);
for(int i = 1; i <= doc2.PageCount; i++)
{
if (i % 2 == 1)
{
// Insert the page to the second document at specified position.
doc2.InsertPage(page, i);
}
}
// Output the new document.
doc2.Save(outPutFilePath)
String inputFilePath1=@”//书页背面
字符串inputFilePath2=@“”//报告
字符串outPutFilePath=@“”//最后报告
PDFDocument doc1=新PDFDocument(inputFilePath1);
PDFDocument doc2=新PDFDocument(inputFilePath2);
//从第一个文档中获取一页。->书页背面
PDFPage page=(PDFPage)doc1.GetPage(0);
对于(inti=1;i来说,让报表页眉和页脚在每页上重复应该是非常简单的
现在,如果您希望在每页重复报告内容之外的其他信息,您可以执行以下操作:
您可能已经知道,在使用Tablix时,可以在每页上重复表标题行。这可以通过添加具有单列的Tablix并使其跨越页面大小来发挥我们的优势。在标题行和数据行中,您可以添加矩形,使其与报表正文类似。在标题行中,您可以添加任何数据/您希望在下一页重复的文本
现在,由于您希望页面的背面有文本,您可能不希望在每一页上都重复此操作。因为页面的背面始终是相同的静态数据,您只需按照当前设置的方式生成报表,并在报表的页面之间插入静态页面即可
要完成最后一部分,可以使用以下代码:
String inputFilePath1 = @""; //back of page
String inputFilePath2 = @""; //report
String outPutFilePath = @""; //final report
PDFDocument doc1 = new PDFDocument(inputFilePath1);
PDFDocument doc2 = new PDFDocument(inputFilePath2);
// Get a page from the first document. -> back of page
PDFPage page = (PDFPage)doc1.GetPage(0);
for(int i = 1; i <= doc2.PageCount; i++)
{
if (i % 2 == 1)
{
// Insert the page to the second document at specified position.
doc2.InsertPage(page, i);
}
}
// Output the new document.
doc2.Save(outPutFilePath)
String inputFilePath1=@”“;//页面背面
字符串inputFilePath2=@“”;//报告
字符串outPutFilePath=@“”;//最终报告
PDFDocument doc1=新PDFDocument(inputFilePath1);
PDFDocument doc2=新PDFDocument(inputFilePath2);
//从第一个文档中获取一页。->页的背面
PDFPage page=(PDFPage)doc1.GetPage(0);
对于(int i=1;i