Click here to Skip to main content
15,888,113 members

Comments by JanardhanSharma (Top 22 by date)

JanardhanSharma 3-Apr-17 8:39am View    
I've tried but wasn't able to see the change. Same issue has occured.
JanardhanSharma 31-Dec-16 0:52am View    
It's working fyn. Thanks a lot.
JanardhanSharma 10-Aug-16 5:00am View    
but it's working for asp.net as well. by default it's allowing the pdf to be opened in adobe reader but in a while it's also getting opened in OneNote.. once it's displaying in OneNote then the pdf file getting closed.. this is all happening in seconds. i dont understand this abnormal behaviour.
JanardhanSharma 9-Aug-16 2:00am View    
Here is my code, I wasn't able to find why the $find("ReportViewer1") going null though if the control id is same "ReportViewer1". When if im using $get it's working fine. But that doesnt contain get_isLoading property.
i've tried the code from the following link
https://blogs.msdn.microsoft.com/selvar/2011/04/09/invoking-the-print-dialog-for-report-viewer-2010-control-using-the-javascript-api/

<pre lang="HTML">
<form id="form" runat="server" style="width: 100%; height: 100%;">
<asp:ScriptManager ID="ScriptManager1" runat="server">

<asp:Button ID="btnBack" class="classname" runat="server" Text="Back" OnClick="btnBack_Click" />
<asp:Button ID="btnClose" PostBackUrl="ReportsNewMain.aspx" class="classname" runat="server"
Text="Close" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server" InteractivityPostBackMode="alwayssynchronous"
ProcessingMode="Remote" PromptAreaCollapsed="True" Width="100%" Height="515px"
DocumentMapWidth="100%" Font-Names="Verdana" Font-Size="8pt">
<serverreport reportserverurl="">

<div align="center">
<asp:Panel ID="PanelButtons" runat="server" Width="527px" BorderColor="#999999">
<asp:Button ID="btnPrint" runat="server" Text="Print"
OnClientClick="PrintReport()" />

</div>
</form>
<script language="javascript" type="text/javascript">
function PrintReport() {
try {
//var viewerReference = $find("<%= ReportViewer1.ClientID %>");
var viewerReference = $find("ReportViewer1");
//var viewerReference = $get("ReportViewer1");
var stillonLoadState = viewerReference.get_isLoading();

if (!stillonLoadState) {

var reportArea = viewerReference.get_reportAreaContentType();
if (reportArea == Microsoft.Reporting.WebFormsClient.ReportAreaContent.ReportPage) {
$find("ReportViewer1").invokePrintDialog();
}
}
}
catch (err) {
document.getElementById("demo").innerHTML = err.message;
}
}
</script>
</pre>
JanardhanSharma 4-Jul-16 1:27am View    
Nope, It's refreshing only the label Control