How to make the printer settings window always on top?
web environment Thanks!
lzsh0622,
Do you print report from web? Could you give example code fro print reports from web?
i use VS2010, when i try print from VS all was ok, when i used ISS Printer property windows never showed.
Do you print report from web? Could you give example code fro print reports from web?
i use VS2010, when i try print from VS all was ok, when i used ISS Printer property windows never showed.
// vs2005 c# code
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FastReport.Web;
using FastReport;
public partial class AppReport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebReport1.Prepare();
}
}
protected void WebReport1_StartReport(object sender, EventArgs e)
{
string cmdtxt = "select * from tab_App where ID=" + KeyID;
DataTable dt = new DataTable("tab_App");
if (JaSql.ReturnDataTable(cmdtxt, dt))
{
FastReport.Report rpt = (sender as WebReport).Report;
rpt.Load(Server.MapPath("AppReport.frx"));
rpt.RegisterData(dt, "tab_App");
rpt.SetParameterValue("constr", GetConnString);
}
}
Thank you for sharing your post. I was looking for such kind of post for a long time. Finally I got one. Happy to be a member of this forum. Good work buddy. Keep on posting. Wish you a very happy Merry Christmas and Happy New Year.
My name is Jenifer. and I am new here. Wish you all a happy and joyful 2011. It will be great for me to be here with all you people. From the last few weeks I was visiting here and then I decided to be an active member here and so I am here. My hobbies are singing, watching science-fiction and comedy movies. Collecting and listening all types of famous audio songs is what I like the most. Hope to enjoy my stay with all you guys. I look forward to being a part of this community. Thanks in advance.
Comments
lzsh0622,
Do you print report from web? Could you give example code fro print reports from web?
i use VS2010, when i try print from VS all was ok, when i used ISS Printer property windows never showed.
// vs2005 c# code
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FastReport.Web;
using FastReport;
public partial class AppReport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebReport1.Prepare();
}
}
protected void WebReport1_StartReport(object sender, EventArgs e)
{
string cmdtxt = "select * from tab_App where ID=" + KeyID;
DataTable dt = new DataTable("tab_App");
if (JaSql.ReturnDataTable(cmdtxt, dt))
{
FastReport.Report rpt = (sender as WebReport).Report;
rpt.Load(Server.MapPath("AppReport.frx"));
rpt.RegisterData(dt, "tab_App");
rpt.SetParameterValue("constr", GetConnString);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
WebReport1.Report.Print();
}
}
<%@ Register Assembly="FastReport" Namespace="FastReport.Web" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" Runat="Server">
<div style="height:38px">
<asp:Button runat="server" ID="Button2" Text="Button" OnClick="Button2_Click" />
</div>
<div>
<cc1:webreport id="WebReport1" LocalizationFile="../../reports/Chinese.frl" runat="server" onstartreport="WebReport1_StartReport"
height="1000px" width="800px" ShowToolbar="False" Pictures="False" > </cc1:webreport>
</div>
</asp:Content>
Do you solve this problem?? If you have solution, pls write it here.