I have issue when used reportviewerFX

Stimulsoft Ultimate discussion
Post Reply
pdt1704
Posts: 60
Joined: Tue Nov 15, 2011 9:12 pm

I have issue when used reportviewerFX

Post by pdt1704 »

Sometimes, when I open report with WebViewerFx, I have issue like that:
Server cannot set status after HTTP headers have been sent.

at System.Web.HttpResponse.set_StatusCode(Int32 value)
at Stimulsoft.Report.WebFx.StiWebViewerFx.ResponseBuffer(Byte[] buffer, String contentType, Int32 cacheTimeout)
at Stimulsoft.Report.WebFx.StiWebViewerFx.View(StiReport viewReport)
at BloodBankManagement.Mau_G1_KhoaHCTTXN_SDDVM_Report.exportReport() in C:\inetpub\wwwroot\BloodBankWeb\BloodBank\DailyReport\Mau_G1_KhoaHCTTXN_SDDVM_Report.aspx.vb:line 58
at BloodBankManagement.Mau_G1_KhoaHCTTXN_SDDVM_Report.PageLoad(Object sender, EventArgs e) in C:\inetpub\wwwroot\BloodBankWeb\BloodBank\DailyReport\Mau_G1_KhoaHCTTXN_SDDVM_Report.aspx.vb:line 37
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
WebViewerFx.zip
(10.86 KiB) Downloaded 314 times
Please help!
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: I have issue when used reportviewerFX

Post by Vladimir »

Hello,

Please try to set the following option:

Code: Select all

StiOptions.Web.ClearResponseHeaders = false
Also, in your code, comment out the following line:

Code: Select all

report.Render(False)
report.Dictionary.Variables("PF_DateActive").RequestFromUser = False
'StiWebViewerFx1.Report = report  - this line is not needed
StiWebViewerFx1.View(report)
Thank you.
pdt1704
Posts: 60
Joined: Tue Nov 15, 2011 9:12 pm

Re: I have issue when used reportviewerFX

Post by pdt1704 »

Hi,
Thanks for reply, I still see this issue, please help.

Code: Select all

        StiOptions.Web.ClearResponseHeaders = False
        report.Load(sPathReport & "Report_Mau_G1.mrt")
        report.RegData(objReport.Load_Report_G1(Active_ID, Hospital_ID, sFrom_Date, sTo_Date, Accept_YN))
        report.Compile()

        report.Render(False)
        report.Dictionary.Variables("PF_DateActive").RequestFromUser = False
        StiWebViewerFx1.View(report)
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: I have issue when used reportviewerFX

Post by Vladimir »

Hello,

We were unable to reproduce the error using the information you supply. Please send fully working project for the analysis and testing. Perhaps the error depends on something else.

Thank you.
pdt1704
Posts: 60
Joined: Tue Nov 15, 2011 9:12 pm

Re: I have issue when used reportviewerFX

Post by pdt1704 »

Hi,
When I set following option

Code: Select all

        'StiOptions.Web.ClearResponseHeaders = True
        StiOptions.Web.AllowUseResponseFlush = False
        'Response.BufferOutput = False
        HttpContext.Current.Response.ClearHeaders()
It run very good.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: I have issue when used reportviewerFX

Post by Alex K. »

Hello,

On some servers (especially with MediumTrust) can be is prohibited Flush command in sending data. We are glad that you find a workaround.

Let us know if you need any additional help.
Thank you.
Post Reply