Try using an IFrame instead that hosts the page... That should avoid =
popup blocking and allowing you to still generate multiple reports. =20
[quoted text, click to view] "kewl" <nospam@company.com> wrote in message =
news:OlX%23cg6RGHA.4792@TK2MSFTNGP14.phx.gbl...
Hello,
We have created an ASP.NET 2.0 (C#) intranet application that uses SQL =
Server 2005 Reporting Services and that needs to generate multiple =
reports at the same time. Let me try to explain.
In our application we allow users to select a number of reports and =
save them as a report group. Each individual report's details (report =
name, report path, parameters, parameter values, etc.) are saved into =
our own SQL Server 2005 database tables. Then in the code for our =
application we have a method that iterates through all the records in =
our ReportGroups table (this table says which reports are in which =
group) and tries to generate each one programmatically.
So, our first thought was to spawn a new browser window for each =
report and use URL access to generate each of the reports in the report =
group (each report would be in it's own window). Here's some example =
code:
// Go thru each datarow in the datatable
foreach (System.Data.DataRow drReportGroupsDetails in =
tableReportGroupsDetails.Rows)
{
// Get the needed values from the datatable
string reportName =3D (string)drReportGroupsDetails["ReportName"];
string reportPath =3D (string)drReportGroupsDetails["ReportPath"];
// Do other work ...
// Build the URL - NOTE: The reportName and reportPath variables =
are different each time thru the loop
// Build the URL for URL access to the report and ReportServer
url =3D "http://localhost/..." + reportPath + "..." + all other =
parameters/values + "...";
// Build the javascript to display the message
sScript =3D "<script language=3D\"javascript\" =
type=3D\"text/javascript\">window.open(\"" + url + "\", =
\"GenerateReport\", =
\"height=3D675,width=3D975,left=3D0,top=3D0,copyHistory=3Dno,directories=3D=
no,location=3Dno,menubar=3Dno,resizable=3Dno,scrollbars=3Dno,status=3Dno,=
toolbar=3Dno\");</script>";
// Execute the script
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), =
"GenerateReport", sScript);
}
This, for the most part, works. We're having troubles spawning =
multiple browser windows.
But, my real question(s) is: Would anyone know of a better way to =
provide such functionality? Does anyone have any other great ideas on =
how to generate multiple reports programmatically?