多页报告 [英] Multiple page Reporting

查看:96
本文介绍了多页报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好



我正在开发一个应用程序是asp.net,我陷入了报告页面的某一点。我做了一个Report.aspx页面。页面内容是



1.包含信头的背景图片控件(可直接通过浏览器打印)

2一个GridView,与字母头对齐,绑定到数据库表。



我的问题是字母头部的可用空间有限。是否有可能如果GridView中的行数更多,比方说10,整个字母头会在现有的字母头下方自动重复以容纳额外的行吗?



结论是,最终我应该能够获得多页打印报告,内容与信头同步。知道如何实现这一点吗?如果我的方法不实用,解决这个问题的正确方法是什么?



感谢期待



更新:

为了更好地理解,请参阅以下链接中的图像

http://s24.postimg.org/p286y1cl1/Query.jpg

Good evening

I am developing an application is asp.net and I got stuck at a point in the report page. I have made a Report.aspx page. the contents of the page are

1. A background picture control which contains the Letter Head (to be printed directly via browser)
2. A GridView, aligned with the letter head, which in bound to a database table.

My problem is that the space available in the letter head is limited. Is it possible if the number of rows in the GridView is more the, lets say, 10, the full letter head gets repeated automatically below the existing one to accommodate the additional rows?

The conclusion is that in the end I should be able to get multiple page printed report, with the contents synchronized with letter head. Any idea of how to achieve that? If my approach is not practical, what is the right approach to solve this problem?

Thanking in anticipation

Update:
For better understanding, please see the image on the following link
http://s24.postimg.org/p286y1cl1/Query.jpg

推荐答案

我认为你缺少的是css中的媒体元素。



以下说明如何添加一个报告页脚...带有一个小调整,在文章中也解释了一个标题。



当你创建CSS时,你可以设置媒体类型:



I think what you're missing is the media elements in css.

The following explains how to add a report footer... with a small adjustment, which is explained in the article a header too.

When you create CSS you can set the media type:

@media screen { .myCSSClass { } }
@media print { .myCSSClass { } }





这会强制在屏幕和打印上使用不同的CSS样式。



设置位置修复然后为标题或者设置 top 对于页脚, bottom ,您可以在打印时强制在每个页面上重新打印特定的HTML。



通过为屏幕打印媒体类型设置不同的样式,您可以获得一个只出现一次的标题屏幕,但在你打印的每一页上都有。





This forces different css styles for on the screen and printing.

Setting position to fixed and then setting the top for a header or the bottom for a footer, you can force a specific bit of HTML to reprint on every page when it prints.

By setting a different style for both screen and print media types you can get a header which appears just once on the screen but on every page when you print.

@media screen {
    div.divHeader {
        position: relative;
    }
}
@media print {
    div.divHeader {
        position: fixed;
        top: 0;
    }
}





这是文章:



http://stackoverflow.com/questions/ 1360869 / html-print-header-footer [ ^ ]


这篇关于多页报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆