You are provided with a sample program that demonstrates how to use the Catalog API to create or modify a catalog - TestCatalogAPI.java that is located in <install_root>\help\designer\samples.
Here, TestCatalogAPI.java has been used as an example to explain how the methods work in the Catalog API.
Designer dr = new Designer(".\\","demo.cat");
If the catalog named demo.cat exists, it will be opened. Otherwise it will be created.
CatalogAPI cat = dr.getCatalogAPI();ConnectionHandles = cat.insert(true,"jinfonet","Accessdbase","jinfonet",null);tablehandles = cat.insert(null,null,"Customer",cat.TABLE);
|
cat.insert("SQL1","C:\\JReport\\Designer\\help\\designer\\samples\\sqlfile.txt");cat.save();In the following example, we assume that all the classes used in the demo are included in C:\test\classes, for example, the classes for creating a catalog. After running the program, a new catalog file Tutorial.cat will be created in C:\JReport\Designer\Demo\Reports\APITutorial. Be sure to create this empty directory first.
|
|