I need to know if there is a way to detect what the user did during a print operation. Specifically, I need to know whether they chose to “Print” or “Preview”. I would be nice to have a fully enumerated return value of some kind, such as knowing the difference between “Print”, “Preview”, “Export”, “HTML”, etc.
I am programming in .NET 3.5 SP1 using C#. Simplistically, this is how I am launching into the print cycle:
using (ListLabel LL = new ListLabel())
LL.LicensingInfo = “myLicense”;
LL.NoNoTableCheck = true;
LL.AddVarsToFields = true;
LL.DelayTableHeader = false;
LL.AutoDefineNewPage += new AutoDefineNewPageHandler(LL_AutoDefineNewPage);
DataSet ds = new DataSet(); //populate ds with tables and records... LL.SetDataBinding(ds); String lst = "path to my LST file"; LL.Print(null, LlProject.List, lst, false, LlPrintMode.Export | LlPrintMode.Preview, LlBoxType.StandardAbort, IntPtr.Zero, "Report Designer", true, String.Empty);
Once I have called Print(), I would like to then be able to determine whether the user chose to “Print” or to instead simply “Preview” without actually printing to paper. Is this possible?