Page 1 of 1

Print report on tag change

Posted: Wed Nov 04, 2015 5:22 pm
by Transistor
I'm preparing some code for a site visit so I can't test this at the moment.

When tag Controller1_M18 turns on I want to print a report and then reset the tag. This code I'm putting in the Tags Script module is giving me a simulator error "The name 'PrintReport' does not exist in the current context". Can anyone give me guidance in fixing it?

Code: Select all

namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
	using Neo.ApplicationFramework.Tools.Reporting;
    
		public partial class Report_Functions
	{
		void Controller1_M18_ValueOn(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.ValueChangedEventArgs e)
		{
			// Print the report.
			PrintReport("BatchReport1");
			// Reset the tag.
			Globals.Tags.Controller1_M18.ResetTag();
		}
	}
}
Many thanks.

Re: Print report on tag change

Posted: Mon Nov 09, 2015 7:40 am
by Claus Nielsen
Try with

Code: Select all

Globals.Reports.BatchReport1.Print();