S
Shamin
Hi,
Thanks in advance for answering to my Question. I'm stuck with this
problem and would really appreciate any help.
I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a
datagrid which is populated with list of report names. When the user
click on the name of a report, I display a panel that has a button
which on clicking will run the report. The report will open in
ReportViewer.aspx, This page has a Report Document and
CrystalReportViewer.
I have the Window.open Javascript on Main.aspx which is pasted below.
----------------------
</script>
<script language="JavaScript">
<!--//
function new_window(url) {
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=1010,height=600,left=0,top=0");
}
//-->
</script>
-----------------------
I have the Following code on the Click event of the button in
Main.aspx
------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Session("ReportPath") = mygrid.SelectedItem.Cells(2).Text
Button1.Attributes.Add("onClick",
"new_window('ReportViewer.aspx')")
End Sub
------------------------
I have the Following code in ReportViewer.aspx.
------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Report.Load(Session("ReportPath"))
CrystalReportViewer1.ReportSource = Report
End Sub
------------------------
Here is my Problem. In Main.aspx, when i select a report name and
click the button the first time, I just see the process bar quickly
running from start to end. The report doesn't open. When i click the
button the second time, the report opens fine in a new window. But
then, if i select another report after that and click the button, the
same report opens again instead of opening the new report that i
selected.
How do i resolve this.
Hope i've explained my problem clearly.
Thanks
Shamin
Thanks in advance for answering to my Question. I'm stuck with this
problem and would really appreciate any help.
I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a
datagrid which is populated with list of report names. When the user
click on the name of a report, I display a panel that has a button
which on clicking will run the report. The report will open in
ReportViewer.aspx, This page has a Report Document and
CrystalReportViewer.
I have the Window.open Javascript on Main.aspx which is pasted below.
----------------------
</script>
<script language="JavaScript">
<!--//
function new_window(url) {
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=1010,height=600,left=0,top=0");
}
//-->
</script>
-----------------------
I have the Following code on the Click event of the button in
Main.aspx
------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Session("ReportPath") = mygrid.SelectedItem.Cells(2).Text
Button1.Attributes.Add("onClick",
"new_window('ReportViewer.aspx')")
End Sub
------------------------
I have the Following code in ReportViewer.aspx.
------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Report.Load(Session("ReportPath"))
CrystalReportViewer1.ReportSource = Report
End Sub
------------------------
Here is my Problem. In Main.aspx, when i select a report name and
click the button the first time, I just see the process bar quickly
running from start to end. The report doesn't open. When i click the
button the second time, the report opens fine in a new window. But
then, if i select another report after that and click the button, the
same report opens again instead of opening the new report that i
selected.
How do i resolve this.
Hope i've explained my problem clearly.
Thanks
Shamin