A
Ayoa
I am working on some web based custom reports and i want to open multiple
browser at the click of a button. So for example if i have 2 guids in my
arraylist, i want to open 2 windows.
protected void viewReport2_Click(object sender, System.EventArgs e) {
ArrayList lstReports = new ArrayList();
lstReports.Add("A1CBA123-2881-4654-86B9-6F35BCE23604");
lstReports.Add("A16C569A-6FE4-4FE1-B401-9FA9750C689F");
foreach (string str in lstReports) {
previewReport(str);
}
}
private void previewReport (string reportGuid) {
string url;
url = "Report.aspx?" + "reportuid=" + reportGuid.ToUpper() +
"&__format=XML&account=gstt";
Response.Redirect(url, false);
}
(Note: Report.aspx will take the parameters supplied and generate reports).
In my client side i have the following _javascript.
function viewReport2(){
var form = document.getElementById("clientreports");
form.target = document.getElementById("__newWindow").checked == true ?
"_blank" : "_self";
}
which i call from the eventhandler of the button
_btnViewReport2.Click += new System.EventHandler(this.viewReport2_Click);
_btnViewReport2.Attributes.Add("onclick", "return viewReport2()");
When i run the report, only 1 new window opens. Which is understandable. how
can i modify the code to get it to open multiple windows. The button ca only
be clicked once.
Thanks
browser at the click of a button. So for example if i have 2 guids in my
arraylist, i want to open 2 windows.
protected void viewReport2_Click(object sender, System.EventArgs e) {
ArrayList lstReports = new ArrayList();
lstReports.Add("A1CBA123-2881-4654-86B9-6F35BCE23604");
lstReports.Add("A16C569A-6FE4-4FE1-B401-9FA9750C689F");
foreach (string str in lstReports) {
previewReport(str);
}
}
private void previewReport (string reportGuid) {
string url;
url = "Report.aspx?" + "reportuid=" + reportGuid.ToUpper() +
"&__format=XML&account=gstt";
Response.Redirect(url, false);
}
(Note: Report.aspx will take the parameters supplied and generate reports).
In my client side i have the following _javascript.
function viewReport2(){
var form = document.getElementById("clientreports");
form.target = document.getElementById("__newWindow").checked == true ?
"_blank" : "_self";
}
which i call from the eventhandler of the button
_btnViewReport2.Click += new System.EventHandler(this.viewReport2_Click);
_btnViewReport2.Attributes.Add("onclick", "return viewReport2()");
When i run the report, only 1 new window opens. Which is understandable. how
can i modify the code to get it to open multiple windows. The button ca only
be clicked once.
Thanks