View a report, divided into 3 sections (3 reports, 1 query)

Hello

I'm trying to divide a report based on a selection of views.
It is quite a heavy SQL statement so that want to run it once.
I want to divide it into summary info, cost information and income info.
Ideally I would have just 3 reports with the same selection and select the columsn I want
But for efficiency, I want only to run the sql once.
I don't know how if there is no database caching which would make this sweater cache?
My other option is to load the query into a collection and then interrogate the collection 3 times.
But then I have to map all C001, C002... for correct columsn names etc.

You are looking for just a few tips on best practices for this (or if there is a smart way to divide the reports I was not aware of!)  :))

Thank you
Richard

I had a similar problem. I solved by using APEX_COLLECTION to house data and referenced in various parts of the report on the page. First, I created a process of PL/SQL in the section BEFORE_HEADER of the page to generate the collection:

declare

   vQuery varchar2( 32767 );

begin

   if apex_collection.collection_exists( 'MyCollection' ) then
      apex_collection.delete_collection( 'MyCollection' );
   end if;

   vQuery := 'INSERT QUERY HERE'; 

   apex_collection.create_collection_from_query( 'MyCollection', vQuery, 'NO' );

end;

You will notice that I check whether the collection already exists and if so, I remove it before you refresh the data. You will need to do this to avoid triggering an error because APEX_COLLECTION with to throw an error if you try to create a new collection with the same name as an existing collection. If your data doesn't change very often during a session, you can also use this logic to see if the collection already exists and avoid to re-run the query altogether.

Also, don't forget that if your query relates to the city of strings, place 2 single quotes in the string, as

'select * from CONTACTS where name = ''Smith'' and status = 1'

Then, in the parts of your report, you can query the collection to help:

select C001 as NAME,
       N001 as STATUS
  from APEX_COLLECTIONS
 where COLLECTION_NAME = 'MyCollection'
   and ...

Remember that there is a specific order for the columns according to the type of data, you will need to look at the docs to understand which columns organizes the data from your query. Take a look at http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm#CJAIDBIC in order to better understand the positioning.

Hope this helps,
Jeff

Tags: Database

Similar Questions

  • Satellite C660 - 2 EV screen divided into three sections

    Hi, please someone can help me?

    My Satellite C660 - 2 EV has developed a display problem where the screen is divided into three equal sections or parts, with the section of the Middle standing in the middle of the screen, but the left side is now on the right side of the screen and the right side is now on the left.

    Ive searched the forums and found nothing on the Toshiba site, which just closed, but found that many sites say that it could be a hardware failure, with either the graphics card or the Ribbon that feeds on the screen that runs through the hinges.

    Can anyone plaese shed some light on this?

    > found many sites say that it could be a hardware failure, with either the graphics card or the Ribbon that feeds on the screen that runs through the hinges.

    The same question is displayed on the external screen/monitor?
    If so, this means that your graphics card chip (maybe the motherboard) is the troublemaker.

  • ListView with lines divided into two sections

    Hi guys,.

    How can I develop a listview with rows in two separate sections, as below:

    - - - - - - - -

    Section 1

    - - - - - -- -

    Line a1

    Line a2

    .

    .

    Line am

    - - - - - - - -

    Section 2

    - - - - - - - -

    Line b1

    Line b2

    .

    .

    Line bn

    use two separate fields

  • my laptop screen is divided into 4 identical parts whenever I restart. Why?

    My laptop screen is divided into 4 sections of idential almost whenever I restart.  Icons become very tiny. Then I have to do a system restore to get rid of it. What can I do? I have a compaq presario with windows xp

    go to start, Control Panel, display, office, ensure that your Position button, on the right side, is set to don't stretch not tile.

    You can also check that your system is clean:

    What is your current antivirus?

    Click Start, run and enter in the box:

    Msinfo32

    Click OK, and when the system info summary appears, click on edit, select all (Ctrl-A), copy (Ctrl-C) and paste (Ctrl-V) the information back here in your next reply.

    You can change the personal information.

     

    Download, install, update and scan with these full free malware detection programs:

    Malwarebytes (MMFA): http://www.malwarebytes.org/products/malwarebytes_free

    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    Remove all found, restart, and run again until analyses race clean, these can be removed later if you wish.

  • HP Pavilion dv6: screen divided into 4

    Please, the machine restarted when I got a BSOD whith the memory management code, after having resolved, my HP logo divided into 2 a top and a bottom, but is returned to normal, it does this for about a week and this time, he does not return to normal

    so I started at the login screen and I saw that it was 4 with 2 vertical on the right full screens and 2 screens of half verical on the left

    so I reinstalled windows, but to no avail.

    I've also updated my drivers buht

    I connected to an external monitor, it looks perfect

    Name of the OS Microsoft Windows 10 Pro

    Version 10.0.10240 Build 10240

    Another Description of the OS is not available

    Manufacturer of operating system Microsoft Corporation

    Name of system OFFICE-ACO8E6T

    System manufacturer Hewlett-Packard

    HP Pavilion dv6 Notebook PC model system

    X 64 PC system SKU C2Y45AAR is of Type #ABA

    Processor Intel Core i7-3630QM CPU @ 2.40 GHz, 2401 Mhz, 4 Lossnay 8 logical processors

    BIOS Version/Date Insyde F.26, 03/04/2013

    SMBIOS Version 2.7

    Embedded Controller Version 52.24

    UEFI BIOS mode

    Baseboard manufacturer Hewlett-Packard

    Model baseboard is not available

    Name of plinth base

    Role Mobile platform

    Start secure State

    PCR7 Configuration binding is not Possible

    Windows directory C:\Windows

    System directory C:\Windows\system32

    Boot Device \Device\HarddiskVolume2

    The local United States

    Hardware Abstraction Layer Version = "10.0.10240.16392".

    User name of OFFICE-ACO8E6T\LIVINGSTONE

    Time zone Pacific Daylight Time

    Physical memory (RAM) installed 8.00 GB

    7.89 GB total physical memory

    5.57 GB available physical memory

    9,77 GB total virtual memory

    7.42 GB available virtual memory

    Pagefile 1.88 GB of space

    Paging file C:\pagefile.sys

    Hyper-V - VM monitor Mode Extensions Yes

    Hyper-V - second level address translation Extensions Yes

    Hyper-V - virtualization enabled in Firmware Yes

    Hyper-V - data execution Protection Yes

    Hi @OPTIMISTICSTONE,

    Thank you for joining the HP Forums!

    I noticed your post on how your screen divided into 4 with your HP Pavilion dv6 Notebook. I'm happy to help you!

    What is the number of product/model of your HP Pavilion dv6? How can I find my model number, serial number or product? There are several versions, example: HP Pavilion dv6500.

    For now, maybe the steps described in this guide will help. Solve the problems when switch between views using FN + F4.

    Don't forget to come back to this thread and check "Accept as Solution", if I have successfully helped solve you the problem. If you want to say 'Thank you' to my effort to help, click on the "thumbs up" to give me a Kudos.

    I hope this guide to solve your problem!

  • Normally, when you open the page palette in InDesign, it is divided into two. The upper part is where is the master page (and a page named none), while the lower part is where are the actual pages of documents. Unfortunately, when I opened my palette of p

    Normally, when you open the page palette in InDesign, it is divided into two. The upper part is where is the master page (and a page named none), while the lower part is where are the actual pages of documents. Unfortunately when I opened my palette (InDesign CS 6 on a Mac), there is no upper and lower part of the page-only the lower part is displayed. When I put my cursor on my pages, it tells me that I "Applied A-master".

    Why not my top shows (A-master and none)? The pages that I don't "Act" like master pages - for example, I can't get past page numbering.


    Any help is appreciated. Thank you!

    It looks like the upper part may be in a State reduced - the line was pulled up.

    Just of the cursor on the line that separates the upper and lower sections, and drag it to the bottom.

  • Number of Splittling into a field into several sections

    Hello

    I is currently working on a project where a user enters the required information on the digital registration form, what auto and then fills the data entered on multiple documents. While the majority of data preserves the integrity of format in any of the documents, I am running issues with documents that deviate from this format to standard input. For example, when users enter the following numbers, they are entered in a single line of text:

    Input Field.PNG

    However, the output on a required document divides these figures into several sections:

    Output Field.PNG

    The output document is not managed by my business and I can't make changes to the formatting of the document. Can someone help me find a way to divide the single line of text in the fields as shown camps?

    If you import the form data in the second form, create the NCPDP field # and make it hidden. The visible fields to create three to contain all three parts of the number, for example: NCPDP2.1, NCPDP2.2, and NCPDP2.3

    You can then use a custom for the hidden field of NCPDP validation script is something like the following:

    Custom validation script

    (function () {}

    Do nothing if the field is empty

    If (! event.value) return;

    Fill in the other fields if the length of the string is correct

    If (event.value.length = 7) {}

    getField("NCPDP2.1").value = event.value.slice (0, 2);

    getField("NCPDP2.2").value = event.value.slice (2, 6);

    getField("NCPDP2.3").value = event.value.slice (6).

    } else {}

    What do you do here if the length of the string is not 7?

    }

    })();

    Search for the string slice method in any reference decent JavaScript for more information on its operation. Note that you can make the subfields in the fields of combs to match the spacing of the boxes.

  • Cannot sort bookmarks; they are divided into two groups

    I am trying to sort the bookmarks in the bookmarks Menu by name. They seem to be divided into two groups with no demarcation between them. The first group ends with "Windows"; the second group starts with 'test ideas '. In the list in the bookmarks Menu, "Essay Ideas," comes just after "Windows". Right click on the bookmarks Menu and choose sort by name doesn't fix this.

    There are separators between these two groups?

    Can drag you these bookmarks manually in the order you want?

  • Music not be divided into albums

    I use Windows 10 and have downloaded the music that has been added to my downloads.

    When I try to drag and drop my downloads from I tunes 12.3.3.17 it adds everything but not in their designated just CD all in the form of numbers, for example: 111222333444.

    Is there anyway I can change this so it gets divided into their designated CD?

    Thanks in advance

    You have all the CD in a folder?  If I read this article of law:

    12 iTunes for Windows: importing music and video already on your computer

    You must create a folder for each CD and then import (or drag-and - drop) each CD separately.

  • Why the hard disk is divided into partitions of two data (C:Vista and E: Data)?

    I just started a new A200-1V0 and found that disk space is divided into two partitions of sizes equal 'C:Vista' and ' E: Data "(and a small one EISA).

    WHY? What is the logic and purpose? It's not even as if the C:Vista partition is smaller and intended only to the tricks of the 'system' as the root 'Users' (user Documents) is on it also.

    This is the default for Vista (my first use of it), if not, who said that Toshiba could do this without asking me?

    How can I move the root 'Users' in Vista (in the data partition) - if I have two partitions that I might as well use it?

    I can resize partitions in Vista without a utility 3 rd-party (or a complete backup/restore)?

    Thank you

    Hello just YOU

    Please don't be offended because there is no reason for this. You bought the new product with the factory settings. Toshiba and other hardware manufacturer do not know every customer personally and, unfortunately, it was not possible to ask YOU how to set up YOUR laptop.

    Because of this, there is a recovery of product support that allows to configure the HARD disk according to your wishes and needs.

    Please use this DVD and install OS how you want it to be. What recovery procedure starts, you will see CONFIGURATION option on the right side. Click on it and choose the right option.

    Reinstall the OS and enjoy your life. Really, I don't have the time to write on the floors of two partitions, because this is basic stuff and you probably don't want to waste your time to read this.

    Bye and good luck!

  • Video playback is divided into 4 pieces and is black and white

    Video playback is divided into 4 pieces and is black and white HELP!

    Hello

    1. you play the videos online? If Yes, what browser you are using?

    2. If you play the video with Windows media player, which is the version of Windows media player you are using?

    3. who is the operating system installed on the computer?

    4. If you play the video with Windows Media player, what is the format of these files?

    Please answer us with more information about the issue to help you.

    If you use Internet Explorer refer to this link: solving video problems when you use Internet Explorer

    http://support.Microsoft.com/kb/2532294

    If you use Windows Media Player to refer to this link: Fix Windows Media Player video and other media or questions Library

    http://support.Microsoft.com/mats/windows_media_player_diagnostic/

    I hope this helps!

  • How can I create a screen divided into movie maker?

    original title: Director - split screen

    How can I create a screen divided into movie maker?  I have a video of the presenter and a PowerPoint presentation and would like to show on the screen in the film.

    You need a custom... transition may be the
    the following link would be a place to start.

    Split video Transition
    http://www.windowsmoviemakers.NET/forums/ShowPost.aspx?PostID=200548

    Maybe the next Movie Maker Forum
    would provide more information:

    Movie Makers Forums
    http://www.windowsmoviemakers.NET/forums/

  • Compaq dv6000 - screen divided into 4

    Compaq DV6000 with processor intel core duo and 950 GMA intel card, whenever I start the computer, as soon as it starts, the screen is divided into 4 identical screens, and remains in the same way even after check-in. on vista home premium, looked at the properties to all the graphics, portable restored to factory settings, still problem persists. interesting, however, that display the same laptop to display extended is fine.

    Picture attached in the following post: http://forum.notebookreview.com/hp-compaq/690743-hp-dv6000-screen-split-into-4-please-help.html

    Help, please!

    Thanks for the p/n

    This means that the problem is hardware related. An integrated video chip of your laptop system board has problems.

    If your laptop is still under warranty that HP can be replaced under warranty. Check the status of the guarantee

    You should also check to see if your laptop battery falls under the recall program

    If is no longer in warranty, you need to decide when you replace the motherboard of the laptop or possibly having sewn video chip (it is cheaper) is worth the expense. There are online companies who specialize in this type of repair.

    What are the chipset and the video chip to the system board from your laptop?

    Use CPU-z and GPU-z at the end of this information.

  • The screen is divided into 4

    Hi, can anyone help?
    Suddenly, my screen is divided into 4, which means there are now 4 miniature versions of everything I do. Everybody met it before and there at - it a way to back to normal?
    Thank you very much.

    Hi, Luce,.

    Right now this looks like a harware problem - probably your video card or monitor. First of all lets check to make sure that it is not not a parameter.

    1.), right click on your desktop and click Customize. Then go to display settings. In this window, set your resolution to a lower setting by moving the slider to the left.

    2.) If you have a trial office, have disconnected and reconnected the connection to the monitor. If that does nothing, try connecting a different monitor and make sure you use another cable. If this does not work, you must have a tech look at your video card.

    Thank you, Jeremy M - Support Engineer

  • HP envy m6: display divided into 4 parts

    my laptop screen is divided into 4 parts and everything works fine what to do help me...

    for this reason the letters on the screen are stretched and color changed as little...

    whether the display problem or a driver problem?

    @JohnClintonD,

    Hello and thanks for the display on the HP support forums.  You have a virus or malware.

    Here are some links that can help you.

    HP computers - solve and protection against viruses on your computer (Windows 8)

    Spyware, Adware and browser hijacking software

    HP computers - using Windows Defender to prevent viruses and software spies problems in Windows 8

    So, this site is good for taking care of malware.

    Malwarebytes

    Please let me know how things are going.

    Thanks again for posting and have a great day.

Maybe you are looking for

  • How can I remove a command of chrome?

    Fell on the following under Firefox hidden-Cool Tricks and without thinking, applied to the order: 1 make dance of Firefox. chrome://global/content/alerts/alert.XUL It makes the window Firefox automatic reduce and develop in the corner of your screen

  • Return policy for Macbook

    Hello! I have a 12 "256 GB Macbook computer and I am not at all happy with it. It is extremely slow - cannot manage basic tasks in the finder, internet shuts down constantly on it, the keys get stuck and the trackpad mess up all the time and the batt

  • How to install Visual Studio 6.0 on Windows Server 2012

    I have a build server that is located on Windows Server 2012.  I need to install Visual Studio 6.0 to build some of our VB and C++ components.  Whenever I run the Setup fails.  Can someone please tell me know how to install VS 6.0 on Windows Server 2

  • Need a driver to download for my Hp Pavilion a1247c model

    I have a HP Media center HP Pavilion a1247c pc model. I formatted the hard drive and I tried to reinstall the operating system to an Emachine CD in the computer I have has come with the operating system CD when I bought new in 2005. I managed to inst

  • Can not get Macbook pro to connect to my network

    I was unable to get a macbook pro to connect to my network. I am running a router with SRX400 G wireless broadband. I have 5 pc access without problem; However the macbook will not. I use WEP 128bits encryption, and while the mac detects the network,