##### Example 2: TestMutiUserDesign.java

TestMutiUserDesign.java in `<insatll_root>\help\samples\APIDesign` is primarily designed for creating two reports at the same time using the methods provided by the Design API. The MultiUserDesign API can only create page reports in the V7 and earlier format. These run in later versions of JReport but can not include multiple page tabs, each template can only contain a single report tab.

With this sample program, two reports are created:

- Creating the first instance of MultiUserDesigner
  `desg = new MultiUserDesigner(path, cat, userInfo);`

  The constructor of MultiUserDesigner has three parameters: path, name and userInfo. They are respectively the path and name of the catalog with which the reports will be created, and the user ID and license key which are provided by JReport.

- Creating the first report
  `report = desg.create(name, "invoice", User)`

  This method creates a new report and returns its handle. Parameter name is the name of the report that is to be created, Invoice is the name of query in the catalog file SampleReports.cat on which the report is created, and User is the user who creates the report.

- Getting handles
  `handles = desg.getHandles(report, Designer.PAGE);`

  This method gets all handles of PAGE type and returns a handle array. Parameter report is the parent handle, and Designer.PAGE is the class type value defined in the Designer class.

- Inserting a parameter, Dbfield, formula
  To insert a parameter, Dbfield or Formula. The following methods are examples of the special methods mentioned before. User is the name of each concurrent user.

  `handle = desg.insert(User, header, Designer.PARAMETER, "Parameter1", "PToday")
  handle = desg.insert(User, header, Designer.DBFIELD, "DBField1", "Orders_Order ID")
  handle = desg.insert(User, header, Designer.FORMULA, "formula1", "customeraddress12")`

- Creating the other report
  User is the name of each concurrent user. There are two users in this demo.

  `DesignerReport DESInvoice = new DesignerReport("Myinvoice", test.desg, "designer1");
  DesignerReport DESregionsalesgraph = new DesignerReport("Myregionsalesgraph", test.desg, "designer3");`