Apex collection column 2,3,4 etc and above value not getting properly

Apex collection column 2,3,4 etc and above value not getting properly in the classic report, we follow the below method to solve the issue.

1. Write the sql query for below

apex_item.checkbox2( p_idx =>1, p_value => '~'||COLUMN1 ||'~'||COLUMN2||'~', p_attributes => 'class="your_class_name" id="f01_'||ROWNUM||'"', p_checked_values => :P1_ITEM_ID_LIST, p_checked_values_delimiter => ',')

2. Create collection

BEGIN
apex_collection.CREATE_OR_TRUNCATE_COLLECTION ('YOUR_COLLECTION_NAME');
COMMIT;

for i in 1..apex_application.g_f01.count loop
apex_collection.add_member(
p_collection_name => 'YOUR_COLLECTION_NAME',
p_c001 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 2, NULL, 1)),
p_c002 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 3, NULL, 1))
);
end loop;
COMMIT;
END;

the checkbox2 value column1 and column2 values are stored in single checkbox2 value, we are inserting the data we will split the column1 and column value for this type.

Advertisements

Auto-convert field to uppercase

style="text-transform: uppercase;" onKeyUp="this.value=this.value.toUpperCase();"

This is the simple method, please copy the code and paste into custom attributes and then run the page.

This is just a quick note for my future reference. I needed all items with the class “uppercase” to be converted to uppercase, and I thought it would work with just some CSS:

.uppercase { text-transform:uppercase; }

This makes the items appear uppercase, but when the page is posted it actually sends the values exactly as the user typed. They’d type in “lower“, it looks like “LOWER” on screen, but gets posted as “lower“.

In many cases I could just convert the value in my PL/SQL code, but in cases where I was using Apex tabular forms, I don’t know a simple way to intercept the values before the insert occurs.

To solve this I added this to the page’s Execute when Page Loads:

//the item looks uppercase but the internal value
//is still lowercase
$(document).on('change','.uppercase',function(){
var i = "#" + $(this).attr("id");
$(i).val( $(i).val().toUpperCase() );
});

Or, even better, add this to the application’s global javascript file:

$(document).ready(function() {
$(document).on('change','.uppercase',function(){
var i = "#" + $(this).attr("id");
$(i).val( $(i).val().toUpperCase() );
});
});

Custom Font with the Font Extension in Jasper report

Overview

When using a textual element inside Jaspersoft Studio, users can select the font used for it. Although this seems simple, there are a lot of problems when using the fonts. The main problem is that the available fonts are provided by the operating system and for this reason you can have:

  • A font that it is available in one operating system isn’t available in another. In this case, as fallback solution, the default font is used for the element.
  • A font can be available in different operatiing systems but it could be slightly different from one to another.

In many cases this is simply unacceptable. having a different font from the planned one probably will require more or less space for the text and this could have an impact, not only on the graphical appearance, but also on the layout of the report itself. To overcome this problem, the user can use external font files instead of the system provided fonts. In this way, the report will be independent of the operating system fonts and have the same appearance everywhere. This can be done using a Font Extension.

The PDF Exporter

The font problem could be even more problematic when using the exporters – in particular, the PDF exporter. The PDF format has its own set of fonts. And, if a document needs to use other fonts, they must be embedded inside the PDF. In the first versions of JasperReports this problem was solved by introducing some properties on the textual elements to allow the specification of the PDF font name and encoding, and, if the font will be embedded or not inside the final PDF.

This approach can still be used for backward compatibility, but it is now deprecated and discouraged. In fact, in the latest version of Jaspersoft Studio, a textual element that uses this property shows a warning icon and message. This is because the Font Extension handles the problem better. So, if a user wants to use a custom font in a PDF export, then it should done using a Font Extension.


Download the Font

First, you must have the font you want to use. Jaspersoft Studio allows you to use a wide variety of Font types like TTF, SVG, WOFF and EOT. One of the most used formats is the TTF and there are plenty of websites that collect fonts with various licenses. For this tutorial we will use this one, named Carnivalee Freakshow Font, you can find it also as an attachment to this page. Download it and save the TTF file. If you have downloaded it from the linked website you will need to extract the contents of the zip file.


Create the Font Extension

Open Jaspersoft Studio, go to Window->Preferences

 

From the new dialog, expand the category Jaspersoft Studio on the left, select Font, and then press Add

 

At this point you must provide a unique name for the Font Extension and the path to its extension. In this tutorial we are using a TTF, so we will provide it using the True Type field.

You can also specify a font variant for the Bold, Italic and Bold Italic styled text. If you don’t provide this you will still able to use the font with one of those styles. The normal font will be manipulated to obtain the styled variant. But you can also provide a different Font for each of the variants. It is your choice. In this tutorial we will use only one Normal font.

You can also specify if this font is replaced when exported in PDF. But we will leave this empty since we want to use this Font also inside the PDF export. For this reason we select “Embed this font in the PDF document” and a compatible encoding, like CP1252, since there are only european chars inside the Font. Note that embedding the Font in the PDF export will make the resulting PDF file bigger.

 

Now click Next. In the following steps you can provide additional information for other exporters and restrict the use of this font only to a subset of Locales. We don’t need this so just click “Finish” to close the dialog and “Ok” to close the preferences dialog.

You can now open a report and, between the available Fonts you will find  one named like your Font Extension, “MyCustomExtension” (If you can’t see it try to close and reopen the report). Select it to see it used in the element. You can set the style to Bold, Italic and Bold Italic even if you didn’t provide a specific font when you created the Font Extension.

 

You can also preview and export the report as a PDF to see that your font is used correctly. An extension defined in this way will have a global scope and will be visible by every project in your workspace.


Export the Font Extension

One of the problem that Font Extensions solves is to have the same font on every operative system so the appereance of the text will be the same. But using what is explained in this tutorial we should copy the TTF file on each system, and on each system recreate the Font Extension, with exactly the same name otherwise a report done in one will not find the font in the others. If we were using more TTF files for the text styles we should copy them also and configure more deeply the Extension. It’s not hard, but it could take some time and repeating it many times could introduce errors, like a typo on the Extension name. To make this easier there is the possibility we can export our Font Extension as a JAR and use it in any project.

First, open the Preferences dialog and go to the Fonts to see all your Font Extensions. Select the previously created extension “MyCustomExtension” and click “Export“.

 

At this point a save dialog will popup, define the name of the target file and save it. This JAR has all that is needed to use the extension on another system, you need only to share this single file to port your Font Extension to another machine. You can find the file generated in this way attached to this tutorial.


Import the Font Extension

Now you have your Font Extension. To use it, you must add it to the classpath of the project. For example, to add the Font Extension on the default project, MyReports, right click on it on the Project Explorer and select “Properties“.

 

 

On the dialog that will popup, select “Java Build Path” on the left, then switch on the tab “Libraries” on the right, and click “Add External JARs…”

 

At this point, select your Font Extension JAR and hit Ok. Now, for each report contained in the MyReports project, you will see the font “MyCustomExtension“. On some Jaspersoft Studio versions, the new font will not be visible on the reports that are currently opened in the editor. If this is the case, close the report and reopen it.  Remember also that a Font Extension defined oin Jaspersoft Studio preferences is global.  It can be seen by all the reports in the workspace.  One defined using a JAR in the classpath of a project will be visible only by the reports inside the project.

Overview

When using a textual element inside Jaspersoft Studio, users can select the font used for it. Although this seems simple, there are a lot of problems when using the fonts. The main problem is that the available fonts are provided by the operating system and for this reason you can have:

  • A font that it is available in one operating system isn’t available in another. In this case, as fallback solution, the default font is used for the element.
  • A font can be available in different operatiing systems but it could be slightly different from one to another.

In many cases this is simply unacceptable. having a different font from the planned one probably will require more or less space for the text and this could have an impact, not only on the graphical appearance, but also on the layout of the report itself. To overcome this problem, the user can use external font files instead of the system provided fonts. In this way, the report will be independent of the operating system fonts and have the same appearance everywhere. This can be done using a Font Extension.

The PDF Exporter

The font problem could be even more problematic when using the exporters – in particular, the PDF exporter. The PDF format has its own set of fonts. And, if a document needs to use other fonts, they must be embedded inside the PDF. In the first versions of JasperReports this problem was solved by introducing some properties on the textual elements to allow the specification of the PDF font name and encoding, and, if the font will be embedded or not inside the final PDF.

This approach can still be used for backward compatibility, but it is now deprecated and discouraged. In fact, in the latest version of Jaspersoft Studio, a textual element that uses this property shows a warning icon and message. This is because the Font Extension handles the problem better. So, if a user wants to use a custom font in a PDF export, then it should done using a Font Extension.


Download the Font

First, you must have the font you want to use. Jaspersoft Studio allows you to use a wide variety of Font types like TTF, SVG, WOFF and EOT. One of the most used formats is the TTF and there are plenty of websites that collect fonts with various licenses. For this tutorial we will use this one, named Carnivalee Freakshow Font, you can find it also as an attachment to this page. Download it and save the TTF file. If you have downloaded it from the linked website you will need to extract the contents of the zip file.


Create the Font Extension

Open Jaspersoft Studio, go to Window->Preferences

 

From the new dialog, expand the category Jaspersoft Studio on the left, select Font, and then press Add

 

At this point you must provide a unique name for the Font Extension and the path to its extension. In this tutorial we are using a TTF, so we will provide it using the True Type field.

You can also specify a font variant for the Bold, Italic and Bold Italic styled text. If you don’t provide this you will still able to use the font with one of those styles. The normal font will be manipulated to obtain the styled variant. But you can also provide a different Font for each of the variants. It is your choice. In this tutorial we will use only one Normal font.

You can also specify if this font is replaced when exported in PDF. But we will leave this empty since we want to use this Font also inside the PDF export. For this reason we select “Embed this font in the PDF document” and a compatible encoding, like CP1252, since there are only european chars inside the Font. Note that embedding the Font in the PDF export will make the resulting PDF file bigger.

 

Now click Next. In the following steps you can provide additional information for other exporters and restrict the use of this font only to a subset of Locales. We don’t need this so just click “Finish” to close the dialog and “Ok” to close the preferences dialog.

You can now open a report and, between the available Fonts you will find  one named like your Font Extension, “MyCustomExtension” (If you can’t see it try to close and reopen the report). Select it to see it used in the element. You can set the style to Bold, Italic and Bold Italic even if you didn’t provide a specific font when you created the Font Extension.

 

You can also preview and export the report as a PDF to see that your font is used correctly. An extension defined in this way will have a global scope and will be visible by every project in your workspace.


Export the Font Extension

One of the problem that Font Extensions solves is to have the same font on every operative system so the appereance of the text will be the same. But using what is explained in this tutorial we should copy the TTF file on each system, and on each system recreate the Font Extension, with exactly the same name otherwise a report done in one will not find the font in the others. If we were using more TTF files for the text styles we should copy them also and configure more deeply the Extension. It’s not hard, but it could take some time and repeating it many times could introduce errors, like a typo on the Extension name. To make this easier there is the possibility we can export our Font Extension as a JAR and use it in any project.

First, open the Preferences dialog and go to the Fonts to see all your Font Extensions. Select the previously created extension “MyCustomExtension” and click “Export“.

 

At this point a save dialog will popup, define the name of the target file and save it. This JAR has all that is needed to use the extension on another system, you need only to share this single file to port your Font Extension to another machine. You can find the file generated in this way attached to this tutorial.


Import the Font Extension

Now you have your Font Extension. To use it, you must add it to the classpath of the project. For example, to add the Font Extension on the default project, MyReports, right click on it on the Project Explorer and select “Properties“.

 

 

On the dialog that will popup, select “Java Build Path” on the left, then switch on the tab “Libraries” on the right, and click “Add External JARs…”

 

At this point, select your Font Extension JAR and hit Ok. Now, for each report contained in the MyReports project, you will see the font “MyCustomExtension“. On some Jaspersoft Studio versions, the new font will not be visible on the reports that are currently opened in the editor. If this is the case, close the report and reopen it.  Remember also that a Font Extension defined oin Jaspersoft Studio preferences is global.  It can be seen by all the reports in the workspace.  One defined using a JAR in the classpath of a project will be visible only by the reports inside the project.

Upgrading Oracle Application Express within Oracle Database 11g Express Edition (XE)

Oracle Database 11 g Express Edition (Oracle XE) includes Oracle Application Express release 4.2.6.00.03. It is strongly recommended that you upgrade to the latest release of Oracle Application Express to take advantage of all the latest features.

How to Upgrade

To install the latest version of Oracle Application Express in your Oracle Database XE, first downloadthe latest version of Application Express from the Oracle Technology Network.

1. Unzip the downloadloaded zip file:

  • Linux: Unzip <filename>.zip
  • Windows: Double click <filename>.zip in Windows Explorer
  • [Note: You should keep the directory tree where you unzip the files short and not under directories that contain spaces. For example, within Windows unzip to C:\_apex.]

2. Change your working directory to apex.

3. Start SQL*Plus and connect to the Oracle XE database:

  • Linux:
            $ sqlplus /nolog
            SQL> CONNECT SYS as SYSDBA
            Enter Password:	SYS_Password
    
  • Windows:
            {Command prompt} C:\apex> sqlplus /nolog
            SQL> CONNECT SYS as SYSDBA
            Enter Password:	SYS_Password
    

4. Install Application Express:

  • SQL> @apexins SYSAUX SYSAUX TEMP /i/

5. Log back into SQL*Plus (as above) and configure the Embedded PL/SQL Gateway (EPG):

  • SQL> @apex_epg_config.sql APEX_HOME
  • [Note: APEX_HOME is the directory you specified when unzipping the file. For example, with Windows ‘C:\’.]

6. Upgrade Application Express password:

  •         SQL> @apxchpwd
            Enter password for Application Express ADMIN account.
    

7. In a Web browser, navigate to the Oracle Application Express Administration Services application:

How to find saved Wi-Fi passwords on your Windows 10 PC

If you are trying to see the password for the network that you’re currently connected to, follow these steps:

  • Right-click the network icon on the toolbar and select “open network and sharing center.”
  • In the resulting window, click “Change adapter settings,” right-click on the Wi-Fi network, and select “status” on the drop-down menu.
  • In the resulting pop-up window, select “Wireless Properties,” then click on the Security tab.
  • You should see a check box beside “show characters.” Check this box to reveal your password. (Note: Windows 10 refers to this as a network security key instead of a password.)

If you’re looking up a Wi-Fi network that is out of range, you’ll have to use a command prompt, which is easier than it sounds:

  • Open command prompt, and run it as an administrator.
  • Then, type the following command:

netsh wlan show profile

  • This command will list every Wi-Fi profile that you’ve ever connected to. To reveal the password of a specific network, type the following command, substituting “NETWORK NAME” with the Wi-Fi network you’re looking up:

netsh wlan show profile “NETWORK NAME” key=clear

You’ll see your Wi-Fi password in ‘key content,’ under security settings.

Move the entire row to next page when one or more text fields data overflows to next page

Usually, Clients needs data to be displayed neatly at server UI level though it would be an excel extract or pdf extract.

This tip is useful when report text fields data overflows to next page with wired look and feel.

Solution : 
1) Remove “Detail Over flow” option for all the text elements that are kept on detail band if  the property is already applied.
2) Select the detail band and look into the properties of it.

Chose Split Type = Prevent instead Stretch

 

Screenshot_1