##### Example 2: TestMutiUserDesign.java

TestMutiUserDesign.java is primarily designed for creating four reports at the same time using the methods provided by the Designer API.

Before using the sample program to create reports, it is assumed that TestCatalogAPI.java in `C:\JReport\Designer\help\designer\samples` has been run to generate a catalog file Tutorial.cat in `C:\JReport\Designer\Demo\Reports\APITutorial`.

With this sample program, three reports are created:

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

  The constructor of MultiUserDesigner has two parameters: path and name. They are respectively the path and name of the catalog with which the reports will be created.

- 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 UID of the user.

- 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 other reports
  User is the name of each concurrent user. There are four users in this demo.

      report = desg.create(name,"westregionsales",User)
      report = desg.create(name,"Myregionsalesgraph",User)
      report = desg.create(name,"Mysalesbyregion",User)
      report = desg.create(name, "invoice", User)