📄 webform1.aspx
字号:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebFastReportTest.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<script language="javascript">
function initFastReport()
{
var tempConStr="Provider=SQLOLEDB.1;User ID=sa;Data Source=RJBYX;Initial Catalog=绵竹市2005;";
var tt=document.all("Form1").FastReport1.AddConnectionStr(tempConStr);
}
function SQLFastReport()
{
var dSql="";
var tt="";
dSql = "Select * from bgylb";
tt=document.all("Form1").FastReport1.ClearAllSqlCommand();
tt=document.all("Form1").FastReport1.CloseProc();
tt=document.all("Form1").FastReport1.AddSqlCommand(dSql);
var PrintTemplate="";
PrintTemplate = "E:\\工程文件夹\\SeLang\\改写报表控件\\JLKReport\\WebReportTest\\fr3\\dd.fr3";
tt=document.all("Form1").FastReport1.PrintReportEx(PrintTemplate, 1, 1);
}
function PrintReport()
{
var dSql="";
var tt="";
dSql = "Select * from bgylb";
tt=document.all("Form1").FastReport1.ClearAllSqlCommand();
tt=document.all("Form1").FastReport1.CloseProc();
tt=document.all("Form1").FastReport1.AddSqlCommand(dSql);
var PrintTemplate="";
PrintTemplate = "E:\\工程文件夹\\SeLang\\改写报表控件\\JLKReport\\WebReportTest\\fr3\\dd.fr3";
tt=document.all("Form1").FastReport1.PrintReportEx(PrintTemplate, 0, 1);
}
function ExReportData()
{
var dSql="";
var tt="";
dSql = "Select * from bgylb";
tt=document.all("Form1").FastReport1.ClearAllSqlCommand();
tt=document.all("Form1").FastReport1.CloseProc();
tt=document.all("Form1").FastReport1.AddSqlCommand(dSql);
var PrintTemplate="";
PrintTemplate = "E:\\工程文件夹\\SeLang\\改写报表控件\\JLKReport\\WebReportTest\\fr3\\dd.fr3";
//XLS、XML、TXT、BMP、JPEG、TIFF、PDF、RTF、HTML
document.all("Form1").FastReport1.ExportFile(PrintTemplate,"D:\\ZZ.XLS", "XLS", 0);
}
function FreeFastReport()
{
var tt="";
tt=document.all("Form1").FastReport1.CloseADOConnect();
tt=document.all("Form1").FastReport1.CloseProc();
tt=document.all("Form1").FastReport1.FreeReport();
}
function DesignReport()
{
document.all("Form1").FastReport1.DesignReport("E:\\工程文件夹\\SeLang\\改写报表控件\\JLKReport\\WebReportTest\\fr3\\dd.fr3");
}
//--关闭IE窗体事件
function window.onunload()
{
try
{
FreeFastReport();
}
catch(e)
{
}
}
</script>
</HEAD>
<body onload="JavaScript:initFastReport();" MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<INPUT style="BORDER-RIGHT: lightskyblue thin solid; BORDER-TOP: lightskyblue thin solid; FONT-SIZE: 12px; Z-INDEX: 101; LEFT: 8px; MARGIN: 1px; BORDER-LEFT: lightskyblue thin solid; WIDTH: 72px; BORDER-BOTTOM: lightskyblue thin solid; FONT-FAMILY: 宋体; POSITION: absolute; TOP: 40px; HEIGHT: 24px; BACKGROUND-COLOR: lavender"
onclick="javascript:ExReportData();" type="button" value="导出数据"><INPUT style="BORDER-RIGHT: lightskyblue thin solid; BORDER-TOP: lightskyblue thin solid; FONT-SIZE: 12px; Z-INDEX: 103; LEFT: 88px; MARGIN: 1px; BORDER-LEFT: lightskyblue thin solid; WIDTH: 72px; BORDER-BOTTOM: lightskyblue thin solid; FONT-FAMILY: 宋体; POSITION: absolute; TOP: 40px; HEIGHT: 24px; BACKGROUND-COLOR: lavender"
onclick="javascript:PrintReport();" type="button" value="打印报表"><BR>
<INPUT style="BORDER-RIGHT: lightskyblue thin solid; BORDER-TOP: lightskyblue thin solid; FONT-SIZE: 12px; Z-INDEX: 102; LEFT: 8px; MARGIN: 1px; BORDER-LEFT: lightskyblue thin solid; WIDTH: 72px; BORDER-BOTTOM: lightskyblue thin solid; FONT-FAMILY: 宋体; POSITION: absolute; TOP: 8px; HEIGHT: 24px; BACKGROUND-COLOR: lavender"
onclick="javascript:SQLFastReport();" type="button" value="打印预览"><BR>
<INPUT style="BORDER-RIGHT: lightskyblue thin solid; BORDER-TOP: lightskyblue thin solid; FONT-SIZE: 12px; Z-INDEX: 104; LEFT: 88px; MARGIN: 1px; BORDER-LEFT: lightskyblue thin solid; WIDTH: 72px; BORDER-BOTTOM: lightskyblue thin solid; FONT-FAMILY: 宋体; POSITION: absolute; TOP: 8px; HEIGHT: 24px; BACKGROUND-COLOR: lavender"
onclick="javascript:DesignReport();" type="button" value="设计报表"><BR>
<asp:literal id="Literal1" runat="server"></asp:literal>
<OBJECT style="Z-INDEX: 105; LEFT: 272px; WIDTH: 192px; POSITION: absolute; TOP: 120px; HEIGHT: 32px"
data="data:application/x-oleobject;base64,qCOSP047AUyh8t6zXKNOaFRQRjAGVFBhbmVsAARMZWZ0AgADVG9wAgAFV2lkdGgDwAAGSGVpZ2h0AiAAAA=="
classid="clsid:3F9223A8-3B4E-4C01-A1F2-DEB35CA34E68" name="FastReport1">
</OBJECT>
</form>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -