水晶报表打印与导出

moli_1980 2009-07-16 10:33:10
各位大侠我用vs2008自带的CrystalRepor作了报表,报表在浏览器中可以显示但点击导出和打印按钮只刷新一下页面就没有反映了是何原因??
aspx 文件
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<style type="text/css">
.style1
{
width: 1000px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>

<table cellpadding="0" cellspacing="0" class="style1">
<tr>
<td>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="WF_ReportMonth.rpt">
</Report>
</CR:CrystalReportSource>
</td>
</tr>
<tr>
<td align="right">
<CR:CrystalReportViewer ID="CrystalReportViewer2" runat="server"
AutoDataBind="true" HasCrystalLogo="False" HasGotoPageButton="False"
HasRefreshButton="True" HasSearchButton="False" HasViewList="False"
ReportSourceID="CrystalReportSource1" Width="1270px"
DisplayGroupTree="False" oninit="CrystalReportViewer2_Init"
HasToggleGroupTreeButton="False" PrintMode="ActiveX" />
</td>
</tr>
</table>

</div>
</form>
</body>
</html>

cs文件using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class report : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

}
...全文
42 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wang329382414 2009-07-16
  • 打赏
  • 举报
回复
装没有装PDF?如果没有装个PDF
moli_1980 2009-07-16
  • 打赏
  • 举报
回复
搞定了,装了pdf后还是没行,仔细一看我用的360的浏览器导出页面和打印页面被拦截了。把页面添加到白名单里就OK了。谢谢大家了,接分。
llsen 2009-07-16
  • 打赏
  • 举报
回复
对,需要安装pdf

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧