Export failing with larger dataset

Hi,

We experience a situation, when reports generation fail with a larger dataset, and succeeds with a smaller dataset, having the data source SQL Server.

Couple of unknowns:

  1. Is there a way to obtain more internal information about the reason of the error, since, the error is generic: “A general error occurred during printing. Check the project file and the data source”
  2. It looks like, under the hood L&L uses SQLCommands to retrieve data.
    Is there a way to set the CommandTimeout parameter for these?

I am suspecting, it’s about some internal timeout for data retrieval.

The complete exception is:

combit.Reporting.LL_Printing_Exception: A general error occurred during printing. Check the project file and the data source.
at combit.Reporting.LLException.CheckReturn(Int32 returnValue)
at combit.Reporting.LlCore.LlPrint()
at combit.Reporting.ListLabel.PrintReportFromRelationalDataSourceNewMode(IDataProvider dataSource, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.Reporting.ListLabel.AutoPrint(LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.Reporting.ListLabel.Print(Object userData, LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, IntPtr windowHandle, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.Reporting.ListLabel.Print(LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode)
at combit.Reporting.ListLabel.Print(LlProject projectType, String projectFile, Boolean showFileSelect)
at combit.Reporting.ListLabel.Print(LlProject projectType, Stream projectStream, Stream printerSettingsStream)
at combit.Reporting.ListLabel.Export(ExportConfiguration exportConfiguration)

Hi Adam,

to start off, you could create a log file using Debwin4 - see Troubleshooting Guidance.

Feel free to post it here or share it with our support.

1 Like

Sorry for late turnback, but got busy with other issues meanwhile.

I’ve obtained the internal LL logs by passing an ILlLogger to the constructor of ListLabel constructor.
I will not paste all the logs here, since they are a lot, but share some parts of it:

16:04:23.797 +02:00 [ERR] (PID:27688 TID:8) (LLReports) LL[Net] Caught SqlException (Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.).
Inner Exception: Win32Exception (The wait operation timed out.)
Stack Trace:
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at combit.Reporting.DataProviders.DbCommandWrapper.GetDataReader(IDbCommand cmd)
16:04:58.820 +02:00 [ERR] (PID:27688 TID:8) (LLReports) LL[Net] Caught SqlException (Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.).
Inner Exception: Win32Exception (The wait operation timed out.)
Stack Trace:
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at combit.Reporting.DataProviders.DbCommandWrapper.get_Count()

16:05:33.822 +02:00 [ERR] (PID:27688 TID:8) (LLReports) LL[Net] Caught SqlException (Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.).
Inner Exception: Win32Exception (The wait operation timed out.)
Stack Trace:
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at combit.Reporting.DataProviders.DbCommandWrapper.GetDataReader(IDbCommand cmd)

16:05:45.481 +02:00 [ERR] (PID:27688 TID:8) (LLReports) LL[Net] Caught LL_Printing_Exception (A general error occurred during printing. Check the project file and the data source.).
Inner Exception: null (null)
Stack Trace:
at combit.Reporting.LLException.CheckReturn(Int32 returnValue)
at combit.Reporting.LlCore.LlPrintEnd(Int32 pages)
at combit.Reporting.LlCore.LlPrint()
at combit.Reporting.ListLabel.PrintReportFromRelationalDataSourceNewMode(IDataProvider dataSource, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, String dialogTitle, Boolean showPrintOptions, String tempPath)
at combit.Reporting.ListLabel.AutoPrint(LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, String dialogTitle, Boolean showPrintOptions, String tempPath)

It looks like, it’s related to some SQL timeouts…

Any thoughts?

Maybe you can try to increase the timeout for that command(s)?

If you are using the SqlCommand in the DbCommandSetDataProvider you can try to use its property SqlCommand.CommandTimeout.

And if the SqlConnectionDataProvider is used you can try to define the SqlConnection.ConnectionTimeout Property.

1 Like

We are using SqlConnectionDataProvider and providing the connection string.
The SqlConnection.ConnectionTimeout is about creating a connection, having default value of 15sec, not about timeout of actual data operations.
I’ve tried it, and set to a a big value, but does not solve the issue.

Any thoughts?

Then my last idea on this: As I could see, the used SqlConnectionDataprovider is inherited from DbConnectionDataprovider. Here the event AddDbCommand is available and the DbCommand should be there accessible. Can you try to set the timeout there?