EBDN - Community - Question & Answers

  Tuesday, 28 April 2026
  0 Replies
  147 Visits
0
Votes
Undo
Hello,

I want to create a report on a task object, but I get an Aucotec.EngineeringBase.Client.MethodNotAllowedException.
Here is how I tried it:

var reportTemplate = _eBApplication.ActiveProject.TemplatesFolder.FindObjects(filter,SearchBehavior.Deep).FirstOrDefault();
var obj = _eBApplication.Selection.FirstOrDefault();
var pathToStoreReport = _eBApplication.ActiveProject.DrawingsFolder.Children.FirstOrDefault(x => x.Name.Equals("Temp-"));
var testreport = obj.CreateReport(reportTemplate, pathToStoreReport);


The object I execute the assistant on is a Task of Type "Wartungsmaßnahme" (MaintenanceTask) in the ExecutionTasksFolder.
When I run the assistant on other objects it works.
Via the UI I can create the report on the task.