Generate quantities report for a group of sample lines.
public static void ReportQuantities( ObjectId sampleLineGroupId, string materialList, string reportFile, string styleSheetFile )
Public Shared Sub ReportQuantities ( sampleLineGroupId As ObjectId, materialList As String, reportFile As String, styleSheetFile As String )
public: static void ReportQuantities( ObjectId sampleLineGroupId, String^ materialList, String^ reportFile, String^ styleSheetFile )
| Exception | Condition |
|---|---|
| ArgumentException | Thrown when sampleLineGroup is not valid, or null/empty value passed in for materialList or reportFile. |
| [!:System.Runtime.InteropServices::COMException] | Thrown when error occurs during XML generation and save. |
1// Assume all referenced objects are available in current document. 2 3// 'alignment' is an Alignment object opened for read. 4var allSlgOids = alignment.GetSampleLineGroupIds(); 5ObjectId oidSlg = allSlgOids[0]; 6 7SampleLineGroup slg = oidSlg.GetObject(OpenMode.ForRead) as SampleLineGroup; 8string[] mappingNams = slg.GetQTOMappingNames(); 9 10// Plain XML report. 11SampleLineGroup.ReportQuantities(oidSlg, mappingNams[0], "report-01.xml", ""); 12 13// Report with style sheet. 14SampleLineGroup.ReportQuantities(oidSlg, mappingNams[0], "report-02.xml", "style.xsl");