All you need is a wrapper that can be written quickly. You can also use your own .NET objects or events here. And even if you don't expect it, because you have to communicate via Java to .NET and back to Java, the performance is really good. Such a Javonet based wrapper for the List & Label .NET component has now been developed in cooperation - including a suitable Eclipse Java example, which can be downloaded from GitHub and contains a detailed description. .NET code with easy data binding and printing:
private void OnButtonPrintList() { ListLabel LL = null; try { LL = new ListLabel(); // attach the preview control LL.PreviewControl = this.LLPreviewControl; // bind to the DbCommandSetDataProvider LL.SetDataBinding(CreateDbCommandSetDataProvider(), "Products"); // set the default project name LL.AutoProjectFile = "simple.lst"; // choose a list project LL.AutoProjectType = LlProject.List; // call the print method LL.Print(); } catch (LL_User_Aborted_Exception ex) { // ignore this exception } catch (ListLabelException LlException) { MessageBox.Show("Information: " + LlException.Message + "\n\nThis information was generated by a List & Label custom exception.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error ); } finally { if (LL != null) { LL.Dispose(); } } }
private void OnButtonPrintList() { ListLabel LL = null; try { LL = new ListLabel(); // attach the preview control LL.setPreviewControl(this.LLPreviewControl); // bind to the DbCommandSetDataProvider LL.SetDataBinding(CreateDbCommandSetDataProvider(), "Products"); // set the default project name LL.setAutoProjectFile("simple.lst"); // choose a list project LL.setAutoProjectType(LlProject.List); // call the print method LL.Print(this); } catch (LL_User_Aborted_Exception ex) { // ignore this exception } catch (ListLabelException LlException) { JOptionPane.showMessageDialog(null, "Information: " + LlException.getMessage() + "\n\nThis information was generated by a List & Label custom exception.", "Information", JOptionPane.ERROR_MESSAGE); } finally { if(LL != null) { LL.Dispose(); } } }
Daniel trained with combit as a programmer specialized in software development. He is now engaged in software development and fosters business cooperations. He conducts software trainings and supports the sales team as technical advisor. In his spare time he enjoys mountainbiking around Lake Constance and in the Swiss Alps closeby.