0
votes

Error in File C:\WINDOWS\TEMP\POC1 {EFC98CD9-964C-4683-96BA-E02D634AF240}.rpt: The request could not be submitted for background processing.

vb code: Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportClass Dim location As String = context.Server.MapPath("../POC/POC1.rpt") objReport.FileName = location objReport.Load() objReport.SetDataSource(dsPOC)

    'dsPOC' is a dataset which contains tables

    Dim oStream As System.IO.Stream
    **oStream = objReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)**
    Dim streamLen As Integer = oStream.Length
    Dim arrPOCData As Byte() = New Byte(streamLen) {}
    oStream.Read(arrPOCData, 0, streamLen)

    Dim newDoc As New Doc
    newDoc.Read(arrPOCData)
    finalDoc.Append(newDoc)
    objReport.Dispose()
    dsPOC.Dispose()

Then I got this exception at objReport.ExportTostream(....). I have tried few scenarios from i read up on website. None of them ones seems to be cause for my case. The scenarios are: 1. Suppress blank Sub report - http://aspadvice.com/blogs/rjdudley/archive/2005/10/26/13443.aspx?CommentPosted=true#commentmessage 2. Increase stack size - http://forums.asp.net/t/1647034.aspx/1?Crystal+Reports+Error+The+request+could+not+be+submitted+for+background+processing+ 3. Checked unique identifier in Dataset 4. Added new dll in system32 - http://www.mujpvs.cz/mujpvs/soubory/CR/readme.pdf, 5. Permissions have given to NETWORK SERVICES - http://forums.asp.net/p/1010099/2931117.aspx

Please help me to fix this.. three days i'm sitting with this.

Thanks in advance saj,

1

1 Answers

0
votes

try objReport.Load(location) and see if that helps as I think objReport.FileName should be read only if not check the value of location in the debugger to make sure its set correctly.

edit: I checked and ther is a "set" method but it should only be a file name, not a full path as you are sending, Load(location) is safer as well as taking full path.