Page 1 of 1

I have issue when used reportviewerFX

Posted: Thu Jul 18, 2013 3:40 am
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 315 times
Please help!

Re: I have issue when used reportviewerFX

Posted: Mon Jul 22, 2013 7:10 am
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.

Re: I have issue when used reportviewerFX

Posted: Mon Jul 22, 2013 10:35 am
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)

Re: I have issue when used reportviewerFX

Posted: Tue Jul 23, 2013 10:27 am
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.

Re: I have issue when used reportviewerFX

Posted: Thu Jul 25, 2013 9:02 am
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.

Re: I have issue when used reportviewerFX

Posted: Thu Jul 25, 2013 12:53 pm
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.