IGlobalErrors.GlobalErrorNumber Property
Gets the number of the first global error if any.
ReadOnly Property GlobalErrorNumber() As Integer |
This language is not supported or no code example is available.
int GlobalErrorNumber { get ;} |
This language is not supported or no code example is available.
Property Value
int
The global error number that was reported as the first one.
Zero if no such global error was reported.
The following example shows, how to correctly handle errors from IAnalyticReporting.GetDataSource
method which uses the old error handling.
Dim aTools As IAnalyticReporting = Es.CurrentVersion.GetAnalyticReportingTools() |
Dim fields As List(Of FieldForQdvFldConfigFile) = aTools.GetImageOfFieldsForDataSource( "C:\data_source_fields.qdvfldconfig" , collapsed) |
Dim dataSourceWorkbook As IWorkbook = aTools.GetDataSource(fields, False ) |
If dataSourceWorkbook Is Nothing |
If Not String .IsNullOrEmpty(Context.QdvManager.Environment.GlobalErrors.GlobalErrorMessage) |
Dim errText As String = Context.QdvManager.Environment.GlobalErrors.GlobalErrorMessage |
MessageBox.Show(errText, "Error!" , MessageBoxButtons.OK, MessageBoxIcon. Error ) |
ElseIf Context.QdvManager.Environment.GlobalErrors.MessageStack.Count > 0 |
Dim errText As String = "" |
For Each err As String In Context.QdvManager.Environment.GlobalErrors.MessageStack |
MessageBox.Show(errText, "Error!" , MessageBoxButtons.OK, MessageBoxIcon. Error ) |
This language is not supported or no code example is available.
IAnalyticReporting aTools = es.CurrentVersion.GetAnalyticReportingTools(); |
IEnumerable<FieldForQdvFldConfigFile> fields = aTools.GetAvailableFieldsForDataSource(useEightLevelsWhereApplicable: true ); |
aTools.SaveFieldsForDataSource( @"C:\test.qdvfldconfig" , fields, collapsed); |
IWorkbook dataSourceWorkbook = aTools.GetDataSource( new List<FieldForQdvFldConfigFile>(fields), collapsed); |
if (dataSourceWorkbook == null ) |
if (!String.IsNullOrEmpty(context.QdvManager.Environment.GlobalErrors.GlobalErrorMessage)) |
string errText = context.QdvManager.Environment.GlobalErrors.GlobalErrorMessage; |
MessageBox.Show(errText, "Error!" , MessageBoxButtons.OK, MessageBoxIcon.Error); |
else if (context.QdvManager.Environment.GlobalErrors.MessageStack.Count > 0) |
foreach ( string err in context.QdvManager.Environment.GlobalErrors.MessageStack) |
MessageBox.Show(errText, "Error!" , MessageBoxButtons.OK, MessageBoxIcon.Error); |
This language is not supported or no code example is available.
Available since QDV 7.21.885.
.NET Framework
Supported in: 4.8, 4.7, 4.6, 4.5.2