Thread: streaming reports from report services
Brought to you by:
wrowe
From: David M. <wo...@su...> - 2008-10-20 16:53:39
|
<HTML> <P>I have applications written in Visual Web Developer 2005 that work fine, except for streaming reports. This works fine on IIS and I want it to work on Apache. A PDF is streamed to the client and the "open, save, cancel" dialog appears. Code to create the report is:</P> <P> Dim localReport As New Microsoft.Reporting.WebForms.LocalReport<BR> localReport.ReportPath = Server.MapPath("~/OnCallReport01.rdlc")<BR> Dim command As New Data.SqlClient.SqlCommand(sql & " ORDER BY InSort", connect)<BR> Dim reader As Data.SqlClient.SqlDataReader = command.ExecuteReader<BR> localReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1", reader))<BR> Dim parameter() As Microsoft.Reporting.WebForms.ReportParameter = {New Microsoft.Reporting.WebForms.ReportParameter("Report_Parameter_0", tit)}<BR> localReport.SetParameters(parameter)<BR> SubReportConnect = New Data.SqlClient.SqlConnection(DefaultConnect)<BR> SubReportConnect.Open()<BR> SubReportCommand = New Data.SqlClient.SqlCommand("", SubReportConnect)<BR> AddHandler localReport.SubreportProcessing, AddressOf OnCallReportSubreportProcessingEventHandler<BR> Dim bytes As Byte() = localReport.Render("PDF", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)<BR> If Not IsNothing(SubReportReader) Then SubReportReader.Close()<BR> SubReportReader = Nothing<BR> SubReportConnect.Close()<BR> SubReportConnect = Nothing<BR> reader.Close()<BR> reader = Nothing<BR> Response.Clear()<BR> Response.ContentType = ""<BR> Response.AddHeader("content-disposition", "attachment; filename=OnCallReport.pdf")<BR> Response.BinaryWrite(bytes)<BR> Response.End()<BR> </P> <P> Public Sub OnCallReportSubreportProcessingEventHandler(ByVal sender As Object, ByVal e As Microsoft.Reporting.WebForms.SubreportProcessingEventArgs)<BR> SubReportCommand.CommandText = "SELECT Person.*,AtName,AgAbbreviation FROM Assignment LEFT JOIN Person ON Assignment.AsPnUnique=Person.PnUnique LEFT JOIN AssignmentType ON Assignment.AsAtUnique=AssignmentType.AtUnique LEFT JOIN Agency ON Person.PnAgUnique=Agency.AgUnique WHERE AsInUnique=" & e.Parameters("InUnique").Values(0) & " ORDER BY AtFunctionalOrder, AtName, AsCallOrder"<BR> If Not IsNothing(SubReportReader) Then SubReportReader.Close()<BR> SubReportReader = SubReportCommand.ExecuteReader<BR> e.DataSources.Clear()<BR> e.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_Persons", SubReportReader))<BR> End Sub</P> <P>The asp.net portion of httpd.conf is:</P> <P>#asp.net <BR> LoadModule aspdotnet_module "modules/mod_aspdotnet.so" <BR> AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo <BR> AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" <BR> #On Call<BR> AspNetMount /oncall "C:/David/VS2005/WD/Projects/OnCall"<BR> Alias /oncall "C:/David/VS2005/WD/Projects/OnCall"<BR> <Directory "C:/David/VS2005/WD/Projects/OnCall"><BR> Options FollowSymlinks Indexes<BR> AspNet files<BR> Order allow,deny<BR> Allow from all<BR> DirectoryIndex OnCallInventory.aspx<BR> </Directory><BR> #reporting01<BR> AspNetMount /Reports$SQLExpress "c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportManager"<BR> Alias /Reports$SQLExpress "c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportManager"<BR> <Directory "c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportManager"><BR> Options FollowSymlinks Indexes<BR> AspNet files<BR> Order allow,deny<BR> Allow from all<BR> DirectoryIndex Home.aspx<BR> </Directory><BR> #reporting02<BR> AspNetMount /ReportServer$SQLExpress "c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer"<BR> Alias /ReportServer$SQLExpress "c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer"<BR> <Directory "c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer"><BR> Options FollowSymlinks Indexes<BR> AspNet files<BR> Order allow,deny<BR> Allow from all<BR> DirectoryIndex Default.aspx Default.htm Default.asp index.htm iisstart.asp<BR> </Directory><BR> #asp.net</P> <P>Thanks</P> <P> </P> <P><BR> -- <BR> dgm <BR> </P></HTML> <BR> |
From: William A. R. Jr. <wr...@ro...> - 2008-10-20 21:12:31
|
David McDivitt wrote: > I have applications written in Visual Web Developer 2005 that work fine, > except for streaming reports. This works fine on IIS and I want it to > work on Apache. A PDF is streamed to the client and the "open, save, > cancel" dialog appears. Exactly what failure information do you receive, and where (app logs, apache error logs, client side messages)? |
From: William A. R. Jr. <wr...@ro...> - 2008-10-20 22:15:41
|
Bigjoe11a wrote: > > 2) Most of the time you will have to try it again and again. Before > getting it right. I'm going to hazard a guess that this is related to buffering of request and response bodies. Because ajax is 'bursty', queuing anything may make the page appear broken (since a complete request is just not completed). It's worth a bit of hacking to determine if a no-buffering option can solve this. I'm guessing per-dir (per files or location as well) is necessary to refine this option. |
From: William A. R. Jr. <wr...@ro...> - 2008-10-20 23:50:20
|
Bigjoe11a wrote: > > << Because ajax is 'bursty' > I have no idea what you mean by this. The response isn't closed... it keeps sending incremental parts of the same page as a single response. |
From: Todd H. <ele...@ho...> - 2009-08-20 20:15:58
|
Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build that's fine, I'm just looking for a little push in the right direction. |
From: William A. R. Jr. <wr...@ro...> - 2009-08-21 05:53:19
|
Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Just recalled "why GAC?" in the installer. This information may no longer be applicable though. There were issues with loading it locally due to some combination of the trust schema and signature. Also, gacutil.exe was advertised as *not available* (unsupported) in a runtime install. If these situations aren't an issue, I don't have a particular issue with changing this. Note that the version is strongly bound, so it shouldn't usually be a problem. Can you provide a little more detail why it cannot land in the GAC? One shortcoming is in the compilation cache, I'm not sure how not registering it in the GAC would affect things. We should watch that since it might have an issue on startup times. |
From: William A. R. Jr. <wr...@ro...> - 2009-08-20 21:24:07
|
Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Feel free to experiment. It is (in fact it must be) loaded within bin/ because it has to resolve libapr-1.dll etc, as I recall. But I don't have the install in front of me. But during the build, mod_aspdotnet.dll is brought into the GAC long enough to ensure the types are exported. That may also be the installer pattern. That's a throwback to early .NET and the overall situation may have improved. |
From: Todd H. <ele...@ho...> - 2009-08-21 12:39:03
|
Mr. Rowe, At this point in my experimentation I've only been able to get it working with Apache.Web.dll in the GAC. If I remove it from the GAC and put it in Apache's bin the following errors occur when I attempt to start Apache: (-2146747262)Unknown error: mod_aspdotnet: Failed to create Host connector for /test mapped to D:/Development/Apache/htdocs/testapp (-2146747262)Unknown error: mod_aspdotnet: Unable to cast object of type 'System.UInt32' to type 'System.Int32'. I'm trying to track it down now in the code. Todd -----Original Message----- From: William A. Rowe, Jr. [mailto:wr...@ro...] Sent: Thursday, August 20, 2009 4:57 PM To: Todd Hicks Cc: mod...@li... Subject: Re: GAC Alternative Todd Hicks wrote: > Can mod_aspnet be made to work with Apache.Web.dll somewhere other than in > the GAC (e.g. in Apache's /bin instead)? If I have to make a custom build > that's fine, I'm just looking for a little push in the right direction. Feel free to experiment. It is (in fact it must be) loaded within bin/ because it has to resolve libapr-1.dll etc, as I recall. But I don't have the install in front of me. But during the build, mod_aspdotnet.dll is brought into the GAC long enough to ensure the types are exported. That may also be the installer pattern. That's a throwback to early .NET and the overall situation may have improved. ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mod-aspdotnet-users mailing list Mod...@li... https://lists.sourceforge.net/lists/listinfo/mod-aspdotnet-users |