Web Forms :: Print Button Present In The Toolbar Of IE Not Working?
Aug 30, 2010
I'm facing issue with the print button present in the toolbar of IE. Whenever i click the print button, the page's prerender event is called. This happens only in IE. When i try to print with Firefox, this does not happen. I have an iframe in first.aspx page. In the prerender event handler, I'm giving the iframe source as follows.
iframe1.Attributes["src"] = "second.aspx"
In second.aspx, i read an image file, convert into byte array and display it in the first.aspx iframe as follows.
try
{
response.contenttype("image/jpeg");
response.binarywrite(img);
response.end();
}
catch(Exception ex)
{
response.write("Error loading the image");
}
The image is displaying properly in both firefox and IE. But when i try to print it, i'm getting error in IE. Also, when i ran in debug mode, i found that on click of print button, the first.aspx's prerender event is being called (only in IE).
I'm having issues using the Print/Export functions from the CrystalReportViewer toolbar in Visual Studio 2005. In some cases, the print/export dialog window is simply replaced with the report page, instead of exporting/printing the data. Based on a dropdown box, the Report Document is loaded with a different report file:
If ddReport.SelectedValue = "Report-1" Then rptDoc1.Load(Server.MapPath("/Reports/Report1.rpt"))Else rptDoc1.Load(Server.MapPath("/Reports/Report2.rpt"))End If
Everythings working fine on my PC but when I deployed my application on server, Print and export are not working. Even the toolbar images were not displaying on the report. So I added them manually to my application.
I have this print button on a webform which has many other tools I don't want the invoice history panel to get printed when I click the print button, how do I modify the code for it.I have attached the code for my print button but this prints even the invoice history panel which I dont want
I'm using vs2005 asp .net using c#and i using the crystal report viewer to create my report and preview the report using crystal report viewer. When i run the application, i can preview the report well in the form, but when i click any button of th tool bar then a blank page is getting displayed.
My report is displayed without any problem. However, when I click on the button from my crystal report viewer toolbars I get the error. Note : the toolbars is working fine on my local machine.
Error message : Logon failed. Details: mscorlib : Could not find a part of the path 'C:Documents and SettingschiaMy DocumentsVisual Studio 2008WebSitesSafety Permit System ptLoad_ConfineSpace_Summary.xml'. Error in File C:WINDOWSTEMP ptPrintSummaryConfineSpace {965CF937-D48C-483A-AC32-198A790880A6}.rpt: Unable to connect: incorrect log on parameters.
how to show direct print dialog box when click on print button in crystal report? when i click on print button the it goes to pdf file i want to show print dialog box?
There are two pages in app, pageA and pageB. Once user clicks a button from pageA will open pageB in which there is a crystalreportview to open a crystal report.
In pageB, how to add a close button into the toolbar of crystalreportviewer?
By clicking this button will close pageB and then open pageA
my requirement is : am having a excel sheet with some values listed i want to pass each value present in any(specified) column to a text box present on a remote page (a site other than mine) as a input and capture the result displayed on the page and then store the input and reuslt side by side in db this should repeat till the end of the input values in the excel sheet.
How to clear radiobuttonlist selected value if textbox value is present/selected and viceversa(i.e should clear textbox value if radiobuttonlist has selected value) before clicking the button?
iam using the ReportViewer Control in Visual Studio 2008 for displaying the report on the page. When iam going to Click on Print button iam getting the below error. Unable to load client print control
I am working with crystal reports. I created a button on crystal report viewer toolbar using the following code protected void Page_Init(object sender,
EventArgs e) { Control ts = CrystalReportViewer1.Controls[2]; if (ts.ToString().Contains("ViewerToolbar")) { ImageButton BtnExport = new ImageButton(); BtnExport.ID = "BtnExport"; BtnExport.ImageUrl = "images/pdf.png"; BtnExport.Click += BtnExport_Click; ts.Controls.Add(BtnExport); } UpdatePanel UpdatePanel1 = new UpdatePanel (); System.Web.UI PostBackTrigger trigger = new System.Web.UI.PostBackTrigger (); trigger.ControlID = "BtnExport"; UpdatePanel1.Triggers.Add(trigger); }
My problem is whenever I click the button to export the report, it shows an error like below: Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near .....
In the code behind these literals are populated, the form literal holds a couple of fields, the script literal looks like this:
StringBuilder strScript = new StringBuilder(); strScript.Append("<script language='javascript'>"); strScript.Append("var ctlForm = document.forms.namedItem('{0}');"); strScript.Append("ctlForm.submit();"); strScript.Append("</script>"); ctlPostScript.Text = strJS2; //where strJS2 is the string being returned by the stringbuilder
This is executed when a certain button is pressed. The purpose is to redirect to another site.
This works fine as long as no AJAX is used.
However as soon as AJAX is added, in particular as soon as the script manager is added with partial rendering set to TRUE:
then this stops working. The code in the button is still executed, we checked that, the literals get the right text properties. It appears however that the javascript is not executed. Nothing happens, no redirection.
the problem can be overcome by settin the script manager partial rendering to false, however, when this is done, much of the AJAX functionality stops working.
We think it may have to do with registering the script with the script manager. We tried this:
ClientScript.RegisterStartupScript(this.GetType(), "JSScript", strJS2);//done before setting the text property of the literal
But to no avail.
Anybody has seen this before and knows how its done right?
I am working with asp.net 2.0 project. I have a gridview in one of my forms which contains list of people who are late in payments. Now when I select an item in the grid and hit open it opens a letter to be sent to that person. The user can go and hit print in the letter form and the letter gets printed.
Now the user wants to select multiple items from the list and hit "print All" on the grid page and get all the letters printed silently for all the selected items in the grid.
I have Link Button to Export to excel in Master page. Since I have placed it in master page I can see Export link button in every page. I need to disable link button where gridview is not present in a page.
IÂ thing using Enabled property we can do. How to proceed. Is there any other way to do it.
<asp:LinkButton ID="LinkButtonExport" Text="Export to Excel" runat="server" OnClick="LinkButtonExport_Click" />
i have a transaction when i click the submit button i want to print one number , the follwing is my code and procedure . for insert
ReturnIDcount will display a number with every transaction . i want that number to be print instead of displaying in message box.
 C# con.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_NEW_TRANSACTIONS"; cmd.Parameters.AddWithValue("@Patient", Patient_name);    Â
i have to show PageSetUp Popup on click of Print button, User does not want to go in Prefrences of Printer and also i have to set the Default Printer for Print
I´m using a css media=print file in a Page that is using a MasterPage.I put some pagebreaks like this in certain parts of the html code:<h1 style="page-break-before: always; height: 0px; line-height: 0px;">This works perfectly in the first page, meaning that the styles are applied correctly, but after the pagebreaks, the css is not working any more.Looking somewhere,to delete the masterpage, and yeah, it worked, but it is not the best thing to do, ´cause I have to remember changing this page if the masterpage changes.