I have a model, where I am storing the agent.starttime=time() and agent.endtime = time, and using the formula agent.processingtime = agent.endtime - agent.starttime to get the processing time of each agent. And I am collecting those sample data in a Dataset.
But since those parameters of type double are inside my agent and I am trying to call that dataset in a bar chart on MAIN using Patient.Dataset() (Patient is the name of my agent). But its returning error.
You need to understand agent hierarchy and how to navigate it. See this help page and study the SC tutorial step by step to practice.