Skip to Content
author's profile photo Former Member
Former Member

Invalid Argument Provided/Invalid Argument for Database exception

Hi all,

Since consuming a web service as a datasource with .NET is not really recommended I am attempting to consume the web service in code, take the results and create an ADO.NET dataset, and use that dataset as the datasource for the report. This all works just fine until I try a report with a few hundred rows of data.

The report is fairly simple with just a single table containing four string fields and one byte array containing an image. Because of the image, this dataset is using a large amount of data (~20 mb). So I am suspecting that this is really some sort of a memory issue but the exception doesn't seem to reflect that. Below is the exception I am getting, with the stack trace.

I would appreciate any ideas of what the problem may be.

Oh, yes, I have verified that it isn't the specific data that I am supplying. I have generated the report in smaller chunks with the same data and had no problem with it.




Exception message: Invalid Argument provided.

Error in File ImagesReport {B49B78E7-76B3-46B6-AC16-1E469064F072}.rpt:

Invalid argument for database.

Stack Trace: at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export(ExportOptions options)

at ReportService.ReportService.GenReport(Int32 ReportId, String Parameters, Boolean ContinueIfNoData, OutputType Disposition, String Filename, Nullable`1 Persist, String FtpCredentialId, String PrinterName) in C:\Projects\ReportService\Sources\ReportService\ReportService\ReportService.svc.vb:line 521


Inner Exception message: Invalid Argument provided.

Error in File ImagesReport {B49B78E7-76B3-46B6-AC16-1E469064F072}.rpt:

Invalid argument for database.

Stack Trace: at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 13, 2011 at 03:33 PM

    This could be a memory issue as due to MS imposed security limits, CR has to make it's own copy of the dataset. But, what version of CR and what version of .NET are you actually using?


    Follow us on Twitter

    Got Enhancement ideas? Try the [SAP Idea Place|]

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Ludek Uher

      Hi Ludek,

      Well, thank you very much for following through with this.

      There is nothing in the event logs regarding this error. The data makes it back from the web service. The error happens when calling Export on the report. From its behavior it almost certainly has to be a memory issue. I will give the .dll option some thought. That may be the way to go.

      Thanks again,


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.