IAnalyticReporting.GetDataSource (List<FieldForQdvFldConfigFile>, Boolean, String, Boolean, Boolean, Boolean) Method
Gets a data-source workbook from a list of fields / worksheets.
Function GetDataSource( _ |
ByVal groupsAreCollapsed As Boolean , _ |
Optional ByVal headBranchIdentifier As String = "001000000000000000000000" , _ |
Optional ByVal displayProgressWindows As Boolean = False , _ |
Optional ByVal includeOverheadMinute As Boolean = False , _ |
Optional ByVal includeDatabaseOfEstimate As Boolean = False _ |
This language is not supported or no code example is available.
string headBranchIdentifier = "001000000000000000000000" , |
bool displayProgressWindows = False, |
bool includeOverheadMinute = False, |
bool includeDatabaseOfEstimate = False |
This language is not supported or no code example is available.
Parameters
-
fields
-
List<FieldForQdvFldConfigFile>
A list of FieldForQdvFldConfigFile which can
be created programmatically or retrieved using the GetImageOfFieldsForDataSource function.
-
groupsAreCollapsed
-
bool
A value indicating whether the data source
should have collapsed groups.
-
headBranchIdentifier
-
string
The task/branch for which to get the data. An
empty string or '001000000000000000000000' means entire WBS tree.
-
displayProgressWindows
-
bool
When true, QDV will
display a progress window in the center of the screen.
-
includeOverheadMinute
-
bool
A value indicating whether the data source
must contain the lines of the overhead minute if any.
-
includeDatabaseOfEstimate
-
bool
A value indicating whether the data
source must contain the lines of the database of estimate if
any.
Return Value
IWorkbook
A workbook containing all data of the data-source.
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.
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.
The following example shows, how to correctly handle errors from GetDataSource
method which uses the old error handling.
Available since QDV 7.23.1069.
.NET Framework
Supported in: 4.8, 4.7, 4.6, 4.5.2