Jump to content
Changes to the Jaspersoft community edition download ×

morlandin

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    2

morlandin last won the day on April 26

morlandin had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

morlandin's Achievements

Proficient

Proficient (10/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

3

Reputation

1

Community Answers

  1. Overview In this tutorial we will learn about Jaspersoft® Studio Layouts, how they work and how to configure them. For every layout, there will be an overview of its functionality and configuration options. About the Layouts Jaspersoft Studio Layouts are an automatic way to arrange elements inside a container, like frames, bands, cells and pretty much any element that can contain other elements. When a layout is set on a container, it takes care of arranging the child of the container in a way depending on the layout itself and how it is configured. Not all layouts require a configuration and a layout can also interact with elements of other containers in some complex cases. A Layout can forbid a common operation, like resizing and/or moving the elements inside the container, because the layout is handling this operation. To set a layout, simply select a container and select the layout from the appearance tab inside the properties view: Consider that a layout is used only at design time to help the user, and it is a Jaspersoft Studio feature. This means that it will never be used when a report is executed and if, for example, a container grows during an execution, then the layout is not used to re-arrange the content. Free Layout This is the layout used by default by every container and doesn’t arrange or put constraints on the elements inside the container. Horizontal/Vertical Layout The horizontal layout simply disposes the element into a row where every element has the same width and height. It takes all the elements inside the container and resizes them to fit the height of the container and arranges them to take the width of the container divided by the number of elements. The vertical layout works in a similar way, but it disposes the elements as columns. Neither layout allows resizing or moving of elements. Grid Layout The grid layout is a well known layout to UI designers. Its logic and most of its configuration options are the same. It disposes the elements like a grid where each element is a virtual cell, a specific column or row that can span and have a weight. When using this layout on a container all its child elements will show additional configuration properties in the appearance tab of the property view, which allows configuring how the element will be placed inside the layout. There properties are: Row Number, Column Number, Row Span, Column Span, Fixed Size, Row Weight and Column Weight. This layout doesn’t allow moving elements freely, but allows resizing them in some cases. Look at the property, Fixed Size, for more information. Row Number: this property defines the row taken by the element and can be a number or the special value, 'relative'. When set to 'relative', it uses the same row of the previous element. If it is set on the first element, then it counts as 0. When selecting a number, it will try to place the element in that specific row. If the row number is bigger than the actual number of row, the element will be placed on a new row after the last one, ignoring how big it is. This mean that no space is left between elements. For example: if I have 4 rows, and I set as row number of an element 10, then the element will be placed under the fourth row, creating a fifth. But, if after that, another element is created with row number 7, then it will take the fifth, and the previous one will take the sixth. Column Number: this property defines the column taken by the element and can be a number or the special value, 'relative'. It works exactly like the Row Number but on columns. Row Span: this is an integer value greater or equal to 1 and defines how many rows the element takes. Column Span: this is an integer value greater or equal to 1 and defines how many columns the element takes. Row Weight: defines the height of the current row. Every element has a weight greater or equal to 0, and defines how much space in the container it will proportionally take. For example: if, in a column, there are three elements with weight 1 3 and 5, it is calculated the total weight by summing them, that’s 9. This means that the first element take 1/9 of the available height, the second 3/9 and the last one 5/9. So bigger is the weight and bigger is the element. If on the same row there are more elements with different row weight the one with the bigger value take the precedence. Column Weight: defines the width of the current column. It works exactly like Row Weight. Fixed Size: defines if an element should have a fixed size defined by the user instead to be resized by the layout. If set to true, a layout resize will avoid the element and move the other elements accordingly. Also, the Weight for the elements are disabled, since width and height of this element became fixed. When elements use a fixed size, it is no longer assured that they will completely fit in the container. Spreadsheet Layout The spreadsheet layout creates a tabular structure using elements of different bands. Essentially it creates something that looks like a table but without actually being one. This avoids using subdatasets. The spreadsheet layout is unique because it can resize elements across all the containers and it can be set only on bands, other elements don’t support it. In this layout the elements cannot be moved and the height cannot be changed, but the width can be changed. Also it needs some configuration to work correctly and it has some constraints like: To create a column, it is necessary to exactly place an element in the first detail band. This element will act as pivot for the width of the column. The layout cannot be used on containers different from bands. Every column can have only an element for each band. Something similar to a span can be achieved by using a frame as an element of the column and place inside something else. Every band which contains an element of the column must use a spreadsheet layout, otherwise the element will be ignored. The advantages using this layout are: Changing a width of an element of the column will change the width of every other element in that column. It will be very easy to move and swap columns. It allow to have the convenient layout of a table without having its complexity. All the configuration is done through contextual actions on the elements. To use this layout, it first needs to be set on the detail band. Then, all the elements in the detail will fill the height of the band and will be placed one after another, keeping their original width. These elements must be connected to one or more elements of other bands to form columns. Select all the elements and, from the contextual menu, select the option “Add to Column”. This option is visible if every selected element is inside a container with a spreadsheet layout and if only elements for every band are selected. When an element is placed inside a column, it cannot be moved or resized except for the width, if the width is changed then the width of every element of the column is changed as well, like in a table. Instead, an element inside a container using the spreadsheet layout, but that is not part of a column, can be moved and resized like if the layout were a Free Layout. The only exception is for the elements inside the first detail band because they are implicitly part of a column. An element in a column can be removed from it simply with the contextual action “Remove from column”. The elements in the detail are always disposed in their creation order, the same visible in the outline, but changing the position of an element in the detail will allow to change the position of all its entire column.
  2. Changed Resolution from Won't Fix to Unable to Reproduce Changed Status from New to Closed
  3. Hi, the customizer are embedded in JasperReports, if on studio they works and on the server not probably the JR version is too old an it doesn't support customizers.
  4. Hi, can you provide a sample project already configured where the error is easily reproducible? Thank you.
  5. morlandin

    Composite Element

    Overview The composite elements are a new kind of user created element introduced in Jaspersoft® Studio with version 6.1.1. They allow to create a new element in the palette starting from one or more basic elements, and reuse them whenever you want in any report. For example it is possible to create a composite element using a static text and a text field with some attributes already predefined (like the fonts or the colors). You will have this new element in the palette and when you drag it in the report it will create the same Static Text and Text Field with the same set of properties of the originals. This composite elements are stored inside a special folder of your Workspace, so when you switch your version of Jaspersoft Studio you can always find your previously created elements as soon as you use the same Workspace. Create a Composite Element Creating a Composite Element is really simple. In any report create the elements you want to add to the Composite Element and customize their properties as you want, when you have finished, select these elements, right click on them and from the contextual menu select "Save as Composite Element..". NOTE: A composite element can be created only from a set of Basic Elements, basic means elements that are not depending from a dataset. When you click this option a Dialog will appear, in this dialog you will be able to specify: The name of your Composite Element, this information is mandatory since it will be used inside the palette and must be an unique name An optional description for the element An optional icon used in the palette for the Composite Element, if this field is leave blank then a default image is used. The palette section where this element will be placed After you have set all the information, press Finish. The element will now be created in the selected palette, NOTE: If you create the element inside a palette and in the next run it is missing, then this can happen maybe because you have created it with a Jaspersoft Studio Pro, placing them inside the Pro Components section of the palette, but you are reusing them into a Community version. The Community version does not have the Pro Components section. In this case and in every case where the palette of a Composite Element is missing, it will be displayed in the Composite Elements section of the palette. Use a Composite Element To use your element, you have to simply drag and drop it inside a report, it and all its contents will be created in the same way it was defined originally. Modify a Composite Element When you right click on a Composite Element you have 3 options: Edit: This option reopens the dialog used to Create the element and all information (name, description, icon and palette location) can be changed. Open in Designer: This option can be used to modify the content of the composite element, in other words you can modify the single elements inside it. When this option is selected a special editor will be opened where you can see all the contents of the element and you can modify it as you wish. This editor will look really similar to the report editor but with some simplifications: there will be only a band where the content is placed, there will be no dataset and no possibility to create one and the palette will allow to use only a set of basic elements. In this editor you can add new elements, remove the existing ones or change their properties. When you have finished simply save your work and the associated Composite Element will be reloaded automatically Delete: After confirming request this action will simply delete the Composite Element and all its resources Import/Export of the Composite Elements The composite elements can be exported and imported in any instance of Jaspersoft Studio. To Export a Composite Element: In the Palette, Right-Click on the the element you want to export and select "Export Composite Elements" A dialog will popup and here you can select any number of composite elements to export. The element that was selected in the palette will be already marked for the export. Every element selected in this page will be exported. Press "Finish" and select the destination, every element selected and their resources, like images, will be exported into a single Zip container. This container can then be used in the import procedure to get this elements back. To Import a Composite Element: Right-Click on any position in the Palette and select "Import Composite Elements". Select a Zip container obtained during the Export procedure. A wizard will popup where you can review every element that will be imported, you can define the name, the icon, the description and the palette position of every imported element. However all this fields will be precompiled with the information of the original exported elements, but you can re-define them during the import procedure. If one of the imported elements has the same name as one of the Composite Elements in your workspace, you will need to provide a new name for it, since the name must be unique. When you have reviewed all the elements, press Finish to complete the import procedure.
  6. OverviewWhen the elements in the report designer are dragged, the behavior of Jaspersoft Studio is similar to most graphical designers. When you drag an element inside a band, or a frame, you expect that the element will change its parent. This happens in most of the cases. But there are some special cases where this doesn't happen. In this tutorial we will examine some of these cases and also some keys that can change the default behavior. Elements from different containerWhen you select one or more elements from a container, you can move them with the default behavior. So, if the drop is done in the same container, then only the position changes, otherwise it will be changed also for the container. But if the selection contains elements from different containers, you can only change the position. So even if you drop the selection on a container, all the elements will keep their original parent and will only change their position relative to it. Elements contained inside frameThe behavior of the frame elements is similar to Subreports and, because of this, the size of a frame will not matter anymore on how its content is painted. For this reason the elements inside a frame can be placed outside it without causing errors. To support this, a modifier was added inside Jaspersoft Studio that acts when the dragged elements are contained in a frame. In this case, the dragged elements will never change parent, even if the selection contains elements that are all contained inside the frame. Since an element of the frame can be placed outside of its boundary, there is no way to know if the user wanted to drag an element outside of the frame and change containers or only move an element that is placed outside the boundary. We choose as default behavior that in this case the element doesn't change parent anymore. Override this behaviourThere are two way to override this behaviour and have the dragged elements moved inside the container where they are dropped. Keep pressed the A key while dragging: Keeping the A key pressed during the drag operation will always change the container of the selected elements to the container where they are dropped.Drag & Drop in the outline: these drag and drop modifiers are applied only on the visual editor, so every drag and drop operation done in the outline will always move the elements to the container where they are dropped. This is because, in the outline, it is easier to distinguish clearly what the user wants to do, since it doesn't allow editing the positions of the elements, we can determinate that each drag over a container wants to change the parent of the selection to that container.Other keyboard modifiersAnother useful keyboard modifier is the SHIFT key. When this button is kept pressed during the drag operation, it allows only straight vertical or horizontal movements of the selected elements. Also it allows only one of these directions, so you will be able to move your selection only straight horizontally if after you pressed the SHIFT key the first movement is on the horizontal axis, otherwise if is on the vertical axis only straight vertical movement of the selection are allowed. You can return to the default behavior simply by releasing the SHIFT key, also during the same drag operation. In the Outline, another useful key combination is ALT+SHIT. In a container, for instance Detail, selecting the first element and the last element while pressing this combination will select all the elements that are in the middle of the first and the last one.
  7. Hi, the studio bug was fixed and you will find the fix in the next version
  8. Hi, was not able to reproduce this, can you test if still present in the 6.0.4? if the problem is still present please provide the error log.
  9. Changed Resolution from Open to Unable to Reproduce Changed Status from New to Closed
  10. Changed Resolution from Open to Fixed Changed Status from Assigned to Resolved
  11. Changed Severity from Block to Major Changed Status from New to Assigned
  12. Can you provide some informations to reproduce it? never expirienced this situation before, can you also attach the error log of the application? in the original attachment it is missing,
  13. Changed Resolution from Open to Works as Designed Changed Status from New to Closed Ok, i'll close the bug for now. Feel free to reopen it if you have other issues about this
  14. The 6.0.4 is available now: https://community.jaspersoft.com/project/jaspersoft-studio/releases
  15. Changed Assigned User from - to @User_306070 Can you provide step by step informations to reproduce this?
×
×
  • Create New...