Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Crystal Report Generation Timeout

$
0
0

Hello All,

 

I am hoping to find a way to set a timeout on the generation (not connection) of a Crystal Report in CRXI R2.

 

Ideally, once I call the method, ReportDocument.ExportToDisk(), I would like an exception to occur if the generation takes longer than say, 1 minute.

NOTE: Our Crystal Reports use stored procedures to gather data from an SQL Server 2008 R2 Database.

 

I have attempted the following, without success:

1) Altering the Connection String used to build ConnectionInfo: there is no timeout property.

 

2) Adding an attribute to the ConnectionInfo.Attributes.

     connInfo.Attributes.Collection.Add(New NameValuePair2("General Timeout", "1"))

     => This just caused my report generation to fail.

 

3) Setting the "General Timeout" property of the ReportDocumentDataSourceConnections(index).LogonProperties.   This is done for the Main Report and for subreports.  (Maybe I have done this incorrectly. The "General Timeout" property is being modified, as viewed in the debugger.)

     For index As Integer = 0 To reportDoc.DataSourceConnections.Count - 1

          reportDoc.DataSourceConnections(index).LogonProperties.Set("General Timeout", "1")

     Next

     Note: I am unsure of the time units for the "General Timeout" - the above assumes "minutes".

               => Report Generation did not fail after either 1 or 60 seconds.

 

 

Might anyone know a way to do this correctly?

Kind thank yous!

 

 

TOOLS

================

Crystal Reports XI R2

VB.NET 2.0

SQL Server 2008 R2


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>