How to create an "ad-hoc" report of some planning data?

Introduction

V6 (Win-top) products come with a functionality to create simple one-table reports. This function is called Knowledgeware (KW) Reporting. The name is supposed to illustrate that it is not only possible to report objects and their attributes, but also gives the customer the possibility to report the result of a complex data collection and computation. This latter is called a KW expression. Virtually everything can be reported that can be accessed and computed by the available Knowledge API functions.

Report Template vs. Report Creation

In order to let a "normal" user create a KW report, a report administrator has to declare a report template. A report template declares what objects and columns (attributes or KW expressions) have to be displayed on the report. It also refers to an XML style sheet that describes the format of the report layout. 

Once the report template is created, the normal user can select the template and the data to be reported and then execute the report creation.

Example

The following example requires you to create a "Production System Structure with at least one "Loading Operation". See below. For the Report Template Creation you don't need to have this data already.

This article shows the basics only, it does not use expressions. However, you have to take into account that in order to navigate on the PPR network it is required to have a basic understanding of the notions "Occurrence" vs. "Reference/Instance" (see here) and get a little bit familiar with the KW script language. Of course this knowledge is not required for the persons who create the reports, only for the person who generates the template.

Report Template Creation

The Report Template Creation launched from a command in Knowledgeware/Rules/Knowledge Expert Workbench.

Just call the command Create a Report Template.

This opens the Report Template Definition dialog

In the Report Definition frame, you have to provide a Report Name. This is the (unique) name of the Report document that is stored in the V6 database. You also have to provide a Report Title. This title appears as a header in the report created by the user. In this example, we use a standard Style Sheet that comes with the installation. Just leave the field blank(!) as it is.

In the Attribute Definition frame, you select the type(s) and the attributes to report. Theoretically its possible to have a single table report on multiple object types, but I would recommend to you not to mix types, because this can lead to strange results. The first thing you should do: Click the Load All Types button to make sure that all selectable types are actually available in the drop down list.

The next step is to select the Type to report from the drop down list. Depending on this selection, the Attribute drop down list is filled. In this first example we don't use Expression, please ignore. In the test example, we would like to report the so-called "Loading Operations" under a certain "Production System". The type to select is "PLM Production Loading Operation Reference". From the attribute list, we select the attribute "Name" (this is the NLS translation of the attribute "PLM_ExternalID", which is available on all PLM objects). Then press the Add button.

Once you have pressed the Add button, a new line is added to the Attributes Management frame

Then we add another attribute "Estimated" Time. The result should look like the following screenshot:

We are done with the attributes definition. Using the buttons on the right, you can remove rows as well as change the order of rows here (this translates into column order in the final report).

 

We will not specify an Object Filter in this example. Actually it is possible to filter the result list based on e.g. an attribute value/range.

Then, please make the following settings in the Report Generation Parameters (uncheck all options if checked). I am not going to explain here what it means.

Last but not least, we Save and Close the report template definition. Caution: The button Report Preview does often not work depending on the workshop and the UI activated object!

 

Report Creation

The report creation is launched from the global Knowledge toolbar. Since this toolbar is global, the report can be literally triggered from everwhere. However as the data to be reported and the report template must fit to each other, there are of course limitations to this "from everywhere" concept. Just click the command "Report Generation".

Once you have clicked, the Report Generation panel appears. In this panel you have to first search and select the report template to be used.

This opens a search dialog. If you don't remember the name, enter a * (star) to search all. Klick the Search button. In the result list, select the template you would like to use and the press the OK button.

You then will see the template in the Report Name box. Now we recommend to you to work using the Selected Objects radio button option (the "All Objects in session option" sometimes fails, depending on window you are in and the object which is UI activated).

The option Selected Objects does not mean you have to select every object individually. It is only required to select a top-level object to report what its underneath. For a PPR session with several branches (product, manufactured product, production system, physical resource), you will select one of the top-level objects only. In our case, we select the top-level production system.

Then we click the button Generate Report. The report is displayed on screen first.

Then you have several options how to process it further. We will not show every option here. The most simple is to select the HTML Radio Button option in the Open Report frame and click the Open Report button

This creates a temporary HTML file in a standard OS temp directory (..\\AppData\\Local\\Temp\\Main.html). The Report Title from the template is used as a headline.

Another option is to export the file to MS Excel format. To do that, please specify a (unique) document name. The document will be stored in the V6 database as well as in in a standard OS temp (the same as the online HTM report).

Finally, select the file format you would like to generate and click the Save button.

The document you have created can be found by typing the predefined query "vdoc:*"

You can open the document from the result list. It is treated like other documents in the V6 database including version management.

And here is the result:

 

Back to Tutorials

Back to Wiki Root