Viewing: Repository Administration > Creating Folders and Resources

Managing Folders and Resources

Administrators and users with the proper permissions can create, modify, move, and delete folders and resources in the repository. The specific roles and permissions of the user determine the specific actions that are available. For the definition of the permissions on folders and resources, see section Permissions.

Creating Folders and Resources

Creating Folders

Any user with write permission on a folder can create new child folders in it.

New folders and all their contents inherit the permissions of their parent folders. You can change the permissions later (see section Assigning Permissions).

To create a folder:

1.        Log on as a user who has write permission to the parent folder.
2. In the repository, use View > Repository to locate the parent folder for the new folder.
3. In the Folders panel, right-click the parent folder and select Add Folder from the context menu.

4. The Add Folder window appears.

 

Add Folder Window

5. Enter a folder name and (optional) description, then click Add.

The folder is created in the repository.

Adding Resources

Only administrators can add resources to the repository. End users, even those with write permission on a folder, cannot add resources.

A new resource inherits the permissions of its containing folder. You can change the permissions later (see sectionAssigning Permissions).

To add a resource:

1.        Log in as an administrator.
2. In the repository, use View > Repository to locate the parent folder for the new resource.
3. In the Folders panel, right-click the parent folder and select Add Resource from the context menu, then select the type of resource to add (See "Add Resource > File > Font Menu").

 

Add Resource > File > Font Menu

4. The Add window for the resource type appears. The window has fields and controls for the resource you are adding.

See "Add File Window" shows the blank Add File window and See "Completed Add File Window" shows the window completed.

 

Add File Window

 

Completed Add File Window

5. To save the file in the repository, click Submit.

The file appears in the Content Files folder in the Repository panel.

 

New Font File in Repository

6. See "Add Data Source - Set Data Source Type and Properties - JNDI Data Source" shows the Add Data Source window for a JNDI data source, and See "Completed Add Data Source Window" shows the window completed. The data source type is selected in the Type drop-down.

 

Add Data Source - Set Data Source Type and Properties - JNDI Data Source

 

Completed Add Data Source Window

7. To determine whether you entered the data correctly, click Test Connection.

If the connection fails, check the data that you entered to be sure it is exactly like the data shown in the figure.

8. When the connection succeeds, click Submit.

The new data source appears in the Data Sources folder in the repository (See "New JNDI Data Source in Repository").

 

New JNDI Data Source in Repository

9. To further illustrate variations in the procedure for adding resources, See "Add Data Source - Set Data Source Type and Properties - JDBC Data Source" shows a different Add Data Source window. This one is for a JDBC data source. The fields in the window have changed because of the change in type.

 

Add Data Source - Set Data Source Type and Properties - JDBC Data Source

All the windows for adding resources have fields for specifying the object. You have to provide some of the information in the dialogs; some of the information is taken from the uploaded files themselves; some of it is default data that is shown or provided but which you can change if necessary. The object ID is generated from the name; it must be unique in the folder. The name and description are displayed in the repository.

 

If you are creating a data source, you should validate before submitting it. Click Test Connection to start the validation. If the validation fails, correct the values in the dialogs and test the data source again.

For more specific procedures on creating reports, Domains, and data sources, refer to the JasperReports Server User Guide. For information on creating analysis views and OLAP client connections, refer to the Jaspersoft OLAP User Guide.

Editing Folders and Resources

Renaming Folders and Resources

Any user with write permission on a folder or resource can change its name and description.

To rename a folder or resource:

1.        Log on as a user who has write permission for the folder or resource.
2. In the repository, locate the folder or resource to change.
3. Right-click the object and select Properties... from the context menu.

A Properties dialog appears.

 

Properties Dialog for a Data Source

You can change the folder or resource’s name and description, but not other information, such as resource type and ID; these data are created by the system and displayed here for information only.

As an administrator with Modify permission for the resource, you can also change the user access settings, as described in section Assigning Permissions.

4. Click Submit to save your changes.

 

You cannot change the name of an organization’s top-level folder in the way described here. The name of the top-level folder is copied from the name of the organization. Therefore, to change the name of the folder, you have to change the name of the organization, as described in 12.2, “Managing Organizations,” on page 290.

Editing Resources

Editing a resource uses the same window that is used to define the resource when it is first added to JasperReports Server. The window is useful for simply viewing the resource settings or modifying them. In modify mode, you can reload the resource’s file and change its settings.

Resources that have been added with the repository’s Add Resource menu can only be edited by administrators. For example, only an administrator can edit a JRXML report that he or another administrator uploaded to the repository. Administrators can also edit the report unit of an Ad Hoc report.

End users, even those with write permission on a resource, cannot edit the resource definitions.

To edit a resource:

1.        Log on as an administrator.
2. In the repository, locate the resource to edit.
3. Right-click the resource and select Edit from the context menu.

The Add window for the resource appears (such as Add File Window or Add Data Source - Set Data Source Type and Properties - JNDI Data Source).

4. Use the window to view or modify the resource definition and properties.
5. Click Submit to save any changes.

Moving Folders and Resources

Any user with read permission can copy and cut folders and resources in the repository and paste them elsewhere in the repository, as long as the user has write permission on the destination folder where the object is pasted. All resources and folders in a folder are copied or cut with it.

You can drag-and-drop the objects, or you can paste them as explained below. Folders must be moved one at a time, but multiple resources can be moved together.

 

The moved objects inherit their permissions from the destination folder in which they are placed; they do not keep the permissions they had before the move. If you want the objects to have other permissions, you can set the permissions manually (see section Assigning Permissions).

To move folders and resources by pasting:

1.        Log on as a user who has read permission for the folder or resource.
2. In the repository, use View > Repository to locate the folder or resources to copy.
3. Right-click the object and select Copy or Cut in the context menu that appears.

4. Right-click the destination folder and click Paste in the context menu.

If the Paste command is disabled when you right-click a destination folder, you do not have write permission there.

Deleting Folders and Resources

 

There is no undo from a delete.

Users with delete permission on a folder or resource can delete those objects from the repository. In order to delete a folder, the user must also have delete permission on all the resources and folders that the deleted folder contains because all the contents of the deleted folder are deleted as well.

Folders must be deleted one at a time, but multiple resources can be deleted together.

To delete a folder or resource, right-click the object and click Delete in the context menu that appears.

 

The repository keeps track of which resources are referenced by other resources. It does not allow you to delete resources if they are still referenced other resources. For example, an input type that is used by a report or a properties file that is used by a Domain cannot be deleted as long as the report or Domain still references them.

To find the resources that reference the one you want to delete, you need to look at each report, Ad Hoc topic, or Domain that you suspect of referencing it. When you edit a JRXML report or open a Domain in the Domain designer, you can see the resources it references. Then you can either remove the reference from the resource or delete the entire resource containing the reference.

Reports and Dashboards

Viewing Reports and Dashboards

Only reports and dashboards support a viewing mode, which is equivalent to running them with current data. Any user with read permission can view (run) a report or dashboard. The report can be a JRXML report uploaded by an administrator or an Ad Hoc report saved in the repository.

To view a report or dashboard:

1.        Log on as a user who has read permission for the report or dashboard.
2. In the repository, locate the report or dashboard to view.

 

You can also open a report by clicking View > Reports on the Home page. The repository opens in Search mode. Then use the Filters panel to narrow your search.

3. You can view the report or dashboard in two ways:

Right-click any part of the object’s description in the Repository panel and select Run from the context menu that appears:

 

Right-clicking the Description

a. Click the object’s name. The name is a hyperlink to the report:

 

Clicking the Name/Hyperlink

4. The longer or more complex the report or dashboard is, the more time it takes to display. Click Cancel to stop viewing.

For detailed procedures about running reports and dashboards, refer to the JasperReports Server User Guide.

Modifying Reports

Ad Hoc reports and dashboards are the only resources whose content can be modified by end users as well as administrators. All other resources, such as JRXML reports and Domains, can only be modified by administrators.

To modify a report:

1.        Log on as a user who has write permission for the report to modify.
2. In the repository, click View > Reports or View > Search Results to locate the report.
3. Right-click the report and select Edit from the context menu that appears.

See "Search Results with Sales By Month Report Selected for Editing" shows the Sales By Month report selected.

 

Search Results with Sales By Month Report Selected for Editing

The Edit JasperReport window opens (See "Edit JasperReport Window with Sales By Month Report Selected for Editing").

 

Edit JasperReport Window with Sales By Month Report Selected for Editing

4. Use the wizard menu in the Edit JasperReport window to select the data to change (Set Up, Controls & Resources, and so on).

 

Some of the options in the wizard menu might not apply to the object that you are editing.

5. In this example, select the report’s JRXML resource to get started (See "Pop-up Selection Dialog with Report’s JRXML File Selected" and See "Edit JasperReport Window with JRXML File Added").

 

Pop-up Selection Dialog with Report’s JRXML File Selected

 

Edit JasperReport Window with JRXML File Added

6. Next, select Controls & Resources in the wizard menu.

The Controls & Resources dialog appears (See "Edit JasperReport Window with Controls & Resources Dialog").

 

Edit JasperReport Window with Controls & Resources Dialog

7. In the dialog, click Add Input Control and browse to the control to add (See "Pop-up Selection Dialog with Input Control Selected" and See "Add Input Control Window with Control Added").

 

 

Pop-up Selection Dialog with Input Control Selected

 

Add Input Control Window with Control Added

8. Click Next to add the control to the report (See "Edit JasperReport Window with New Input Control (MyBooleanInputControl)").

 

Edit JasperReport Window with New Input Control (MyBooleanInputControl)

9. You can make additional edits as needed.
10. When you are done, click Submit to save your changes. The edited report overwrites the original one.

For information on creating and editing reports, refer to JasperReports Server User Guide.

Modifying Dashboards

Ad Hoc reports and dashboards are the only resources whose content can be modified by end users as well as administrators.

For more information about creating and using dashboards, see JasperReports Server User Guide.

To modify a dashboard:

1.        Log on as a user who has write permission for the dashboard to modify.
2. In the repository, locate the dashboard.
3. Right-click the dashboard and select Open in Designer... from the context menu.
4. The Available Content and Canvas panels open.
5. Change the dashboard as needed.
6. Click Submit to save your changes.

When you save the dashboard, it overwrites the original one.