Changing the SQL source region according to requirement

I have a region of reports that shows the results of some SQL codes. According to the value of a variable to the page I need to run a little different from SQL to get my results. Right now I use 5 different regions and display one suitable and hide others, according to the value of the variable on the page.

It's a bit messy and I'm looking for a better way to do it. Is it possible to use a single region and change the SQL used as the source of the region after checking my page variable? for example something like this for the source of the region:
IF :report_type = 1 THEN

SELECT col1, col2, col3 from table1;

ELSEIF :report_type = 2 THEN

SELECT col1, col2, col3 from table2;

ELSEIF :report_type = 2 THEN

SELECT col1, col2, col3 from table3;

END IF;
.. or something similar?

Or is there an even easier way to do it?

Hello

for "normal" (non-interactive reports), you can provide a block plsql returning a sql query
as the source of report...

declare
v_sql varchar2 (4000);
Start
IF: report_type = 1 THEN
v_sql: = "SELECT col1, col2, col3 from table1";
ELSE IF: report_type = 2 THEN
v_sql: = "SELECT col1, col2, col3 from table2";
ELSE IF: report_type = 2 THEN
v_sql: = "SELECT col1, col2, col3 from table3";
END IF;
Return v_sql;
end;

as said - this does not work with interactive reports...

Best regards

Carsten-

Tags: Database

Similar Questions

  • Change the SQL report to Intractive report

    Dear friend


    I created the SQL report.

    Could you tell me please, there is a way to change the SQL report to Intractive report.

    How can I do that.

    Thank you

    Under the Definition of the region of the report; look over to the right margin and you will see interactive report-migrate under tasks .

    The f

  • My computer won't let me change the setting of region DVD in the region 1 - I get a message saying that I need admin priviledge

    Hello

    (1) I wanted to play a UK DVD on my computer so I changed the region setting in properties in the United Kingdom (region 2)

    (2) it did not work

    (3) I tried to change my setting back to the United States, so I can play other DVDs (region 1)

    (4) it will not change (the "administrative privileges" message)

    (5) my computer doesn't read DVD

    Hi jeremyjones1960,

    1. How many times to change the region settings of the DVD drive on the computer?
    2. You are logged in Windows by using the administrator account?

    Check and make sure that you logged in to the administrator account and check if it helps.

    If you have changed the settings for region of the DVD player more than 5 times then you will not be able to change more.

  • How to change the areas of region of report in read-only mode?

    How to change the areas of region of report in read-only mode?

    SKUD.

    Add fuction javascript after the page header (or section of function and Javascript variables)

    function disableItems(pRegionStaticId,pDisableFlag) {
      $('#'+pRegionStaticId).find('[name^=f]').each( function(){ /* matches fxx */
        if( $(this).attr('name').match(/f[0-9][0-9]/) ){
          return $(this);
        }
      }).attr('disabled',pDisableFlag);
    }
    

    pRegionStaticId is static Id + the region

    Note that this code specifically disables only the berries of request. Disabled items are not available after the submission (and are therefore different from readonly). But any javascript page can change disabled or readonly points (client side), so you need to check on the side server to validate the data.

    You can disable items to help

    disableItems ("MY_REGION_ID", true);

    and allow them, by passing false

    disableItems ("MY_REGION_ID", false);

  • Change the data source in my ApplicationModule

    Studio Edition Version 11.1.1.3.0

    I have the following problem:
    in WLS 10.3 I've defined three global DataSource (or several)

    and I have only a single ApplicationModule. Can I change the data source in my ApplicationModule (by code)?

    THX Thomas

    Envoy

  • OBIEE Mapviewer 11.1.1.7.1 cannot change the data source

    Hi all

    I am trying to configure mapviewer on our environment and after

    by clicking on configuration

    Add the DB details

    Save & Restart is updated the file xml but not displayed on the data source tab.

    But where as the other details of DB, I am able to add without problem, then if I click on change by selecting the data source to add/edit the details required to DB I get following error.

    Source of data editing is not yet supported. However, you can delete and re-create it with the new settings.

    and on the Management tab is not showing me any option to add the new source of data manually.

    someone has encountered this problem before. TIA

    Maybe the connection details are wrong, you see something in the Map Viewer logs files?

    under FMW_HOME/Oracle_BI1/bifoundation/jee/mapviewer.ear/web.war/WEB-INF/log/mapviewer.log

  • change the SQL license without reinstalling the product?

    We are running out of SQL Server 2005 Workgroup Edition with merge replication, and we just hit a limit of product that we ignore to 25 subscriptions.
    Question: Can we change the Standard Ed license or remove this restriction somehow without having to re - install the product?

    Hello.

     
    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT audience Pro on MSDN. Please post your question in the MSDN forum.
     
  • Monitoring stops working after changing the SQL Service account

    I have the Foglight for SQL Server cartridge. I recently changed the service account that is running the SQL Server engine and SQL Server Agent from a local account to a domain account. Everything works fine on the SQL Server side.

    No configuration changes have been made on the Foglight end, and none should be necessary Foglight is configured to use a separate service for SQL account both OS level followed. This account has always been in the local "Administrators" Group on the database server, as well as a "sysadmin" on the side of SQL Server server role. If I 'validate connectivity' within Foglight to that server, it shows that the connection is correct. I tried to remove the monitoring officer and recreation, but yet to see errors in the attached screenshot. Has anyone meet a similar problem?

    Although I couldn't find any indication that the agents were locked, I tried to release them anyway. That seemed to do the trick!

    This can be found here:

    Databases-> Dashboard Support-> Support of databases-> release agents

  • Change the ImageView source in C++

    Hi guys

    I'm trying to edit an ImageView in C++ source

    I first link QML and C++, can I change the source as in the reference Images

    toplogo = root->findChild ("toplogo");

    toplogo-> setImageSource(QUrl("assets/images/logo.png"));

    The image exists, however, the program crashes and the log indicates that there is no source.

    I tried QUrl errors for different combinations of URL of the image of logging:

    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>
    qDebug()< "error="" url:"=""><>

    But the newspaper still prints for all attempts:

    URL ERROR: ' invalid URL 'asset:///images/logoideas.png' ":" '.

    Any ideas would be appreciated.

    Pepe

    You must use the property objectName (not the id property) > please see my post above

    in QML

    ImageView {}
    objectName: "'toplogo" "

    }

     

     toplogo-> setImageSource (QUrl("asset:///images/logoideas.png"));)<- app="" crashes="">

    It hangs here probably topLogo is NULL

    If {(topLogo)

     toplogo-> setImageSource (QUrl("asset:///images/logoideas.png"));)

    }

  • dynamically change the video source flv to flv play back...

    Dear friends,

    IAM trying to load flv files in flash using flvplayerback components. IAM using the following code. Initially, iam loadign video1.flv. So I want to load video2.flv when I press the next button. It loads video2 only when I press the next button after completing the full video1. I want to change the source at any time please tell the right way.

    Import fl.video.VideoProgressEvent;
    Import fl.video.VideoEvent;
    PLR.source = "video1.flv";


    plr.addEventListener (VideoProgressEvent.PROGRESS, showmsg);
    function showmsg(event:ProgressEvent) {}
    If (plr.bytesTotal == plr.bytesLoaded) {}
    trace ("Loaded");
    loaderpic. Visible = false;
    }
    }

    plr.addEventListener (VideoEvent.COMPLETE, complete);
    function comple(event:VideoEvent) {}
    trace ("film completed");
    }

    nxt.addEventListener (MouseEvent.CLICK, nxtclick);
    function nxtclick(event:MouseEvent) {}
    PLR. Stop();
    PLR.source = "video2.flv";
    PLR. Play();
    }

    Thanks in advance,

    Syed Abdul Rahim

    The code that show you works fine for me when I put things up to match.  When the button is clicked the first video is stopped and another replaces it.  Maybe you have another code that interferes.

  • Change the video source (even video but better quality)?

    Is it possible to change the video from the source of a project with another video which is exactly the same (same fps, same proportions, same time) video, but with better resolution, where all the changes on the last video source will remain on the new video source?

    My situation is that I found a version 720 p 480 p video, I worked (long) with.

    As Jim said, you can do outdoors.

    Sometimes we run with proxy support and who in the Proxy file with the quality full folder native (or ProRes).  You can either share the folder names, move files or in Premiere Pro, you can take the files offline then back online by right-clicking and choose reconnect media.

    This is the easiest part

    If you've been editing on a timeline of 480 p, then through 720 p images bringing you either have to change the settings for the sequence (you can also create a new sequence with the right settings, then copy/paste) or you need to tell Premiere Pro videos 720 p to 480 p sequence size nationwide.

  • Tuning sql of a product to the seller without changing the sql statement

    Hello

    We have a product of the provider that generates the SQL statement. For a query, we get the answer in 15 seconds. But users are asking if we can bring it back to 5 seconds. Limitation is the query can not be changed. He used about 10 to 12 tables and bit complex query.

    What kind of options could be evaluated if we are to improve the performance of a query (not sure if she could never be reduced to 5 seconds)
    without making any change to the query.

    Database Version: Oracle 10.2.0.4

    Thank you
    Delphine

    Hello

    http://www.Oracle-base.com/articles/10G/AutomaticSQLTuning10g.php

    your software is enterprise or standard?

    Tuning Pack & pack diagnosis are extra cost option with the standard edition.

    & the useful note * automatic SQL Tuning - SQL [271196.1 ID] profiles *.

    http://www.Oracle.com/us/corporate/pricing/technology-price-list-070617.PDF

    Thank you

    Published by: CKPT November 5, 2010 11:12

  • change the data source

    I two oracle database, we're for the objective test and another is for production, same table, same name of schema structure there... but diff tns. My question is how quick test for the production of simple way? I tried just add two pool of connections under a schema in the physical layer, but it does not seem to work, can anyone help with a this? Thanks in advance!

    Ishmael

    You can have a single Pool of connections for this requirement. Double click the Connection Pool and change the DSN, user id and password and and keep the RPD when you want to pass the tests of production, or vice versa.

  • Change the input source

    I can't use Ctrl + space to switch the input source, why?

    because the command is CTRL + space.

  • Change the setting of language according to effects CC Portuguese into English.

    Hello everyone.

    I recently bought the Creative Pack Cloud students and made a mistake during the installation, and most of my software is PT - BR.

    So my question is: is it possible that I can change the language in a simple way without download and reinstall?

    In addition to the After Effects, must change to Illustrator, Indesign, and first.

    I appreciate any assistance.

    N ° change the language setting in the CC app and reinstall.

    Mylenium

Maybe you are looking for