|
.NET
protected void button1_Click (object sender, System.EventArgs e) { try { // Bind to a DataSet object LL.SetDataBinding(myDataSet, "Orders");
// Set Properties LL.AutoDesignerFile = "subreport.lst"; LL.AutoProjectType = LlProject.List; LL.AutoDialogTitle = "Sample"; LL.AutoShowSelectFile = true;
// Call the Designer LL.Design(); } // Catch Exceptions: catch (Exception LlException) { MessageBox.Show("Information: " + LlException.Message,"Information", MessageBox.IconInformation | MessageBox.OK); } }
Delphi
{Start the Designer}
procedure TForm1.DesignButtonClick(Sender: TObject); begin //Assign data source LL.DataSource := dsCustomers;
//Pass customer data as fields LL.AutoMasterMode := mmAsFields;
//Set the default project name LL.AutoDesignerFile := 'subrep.lst';
//Switch print mode to preview LL.AutoDestination := adPreview;
//Call Designer LL.AutoDesign('Invoice List', ''); end;
C++
// Define special fields, normal text field: LLDefineFieldExt(job, "Text", "Testtext",LL_TEXT, NULL);
// Footer field, i.e. numeric:
LLDefineFieldExt(job, "Subtotal", "12.34", LL_NUMERIC | LL_TABLE_FOOTERFIELD, NULL);
// Barcode field:
LLDefineFieldExt(job, "BC_EAN_128", "123456789abcd", LL_BARCODE_EAN128, NULL);
// Variable graphics by file name:
LLDefineFieldExt(job, "Regular Graphic","sunny.bmp", LL_DRAWING, NULL);
// File open dialog with sketch: LLSelectFileDlgTitleEx(job, hWnd, "File open", LL_PROJECT_LIST, szFile,sizeof(szFile), NULL);
// Remove a certain menu command from the Designer:
LLDesignerProhibitAction(job, 211);
// Start the Designer with the above fields: LLDefineLayout(job, hWnd, "Title", LL_PROJECT_LIST, szFile);
Visual Basic
Private Sub ButtonDesign_Click() 'Start the Designer with the title "Invoice" and the file "invoice.rpt": ListLabel1.Design(0, hWnd, "Invoice", LL_PROJECT_LIST, "invoice.rpt", 1) End Sub
For data definition the event ListLabel1_CmndDefineFields is used.
Programming Examples Printing...
|