Print report on tag change

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Transistor
Posts: 25
Joined: Sat Jul 04, 2015 6:13 am

Print report on tag change

Post 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.

Claus Nielsen
Posts: 18
Joined: Sun May 31, 2015 2:38 am

Re: Print report on tag change

Post by Claus Nielsen »

Try with

Code: Select all

Globals.Reports.BatchReport1.Print();

Post Reply