Want to create Ineractive report by using pl/sql block

Hi,
But If have to read different informations for different tables, how can I do ?
For example:
for s in (SELECT srv_sys_name,ddb_dbname
FROM search_master
WHERE ( ddb_dbname like '%'||:p7_ddb_dbname||'%' AND :p7_ddb_dbname IS NOT NULL ))
loop
apex_collection.add_member(p7_col, s.srv_sys_name, s.ddb_dbname );
end loop;
If I have an other table to look to get other informations, i don't know what to do ?
It's my problem for now.
Thanks in advance. Bye.

HTML_DB 1.6 + Apex 4.0 + Hyperion user wrote:
But If have to read different informations for different tables, how can I do ?
For example:
for s in (SELECT srv_sys_name,ddb_dbname
FROM search_master
WHERE ( ddb_dbname like '%'||:p7_ddb_dbname||'%' AND :p7_ddb_dbname IS NOT NULL ))
loop
apex_collection.add_member(p7_col, s.srv_sys_name, s.ddb_dbname );
end loop;If I have an other table to look to get other informations, i don't know what to do ?Generally, perform a join combining the tables.
Additionally, creating collections row-by-row is horribly inefficient. Use the <tt>APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B</tt> bulk methods instead.
However in this case the the PL/SQL and collection-based approach is unnecessary. Base the IR on the query (plus joins to whatever other tables are necessary):
select srv_sys_name,ddb_dbname
from search_master
where ddb_dbname like :p7_ddb_dbname_qryand compute hidden item <tt>p7_ddb_dbname_qry</tt> to include the value of <tt>p7_ddb_dbname</tt> and wildcard characters as required.
Finally, note that <tt>LIKE</tt> searches using leading-edge wildcards on large data sets can be inefficient as this eliminates the possibility of using indexes on the searched column.
(Always post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.)

Similar Messages

  • Create crystal report file using JAVA

    Can someone tell me how to a Create crystal report file using JAVA Programming
    I want a very simple example

    Please help me. It's urgent.[http://catb.org/~esr/faqs/smart-questions.html#urgent]
    Be back in an hour or two...

  • How to create custom report plugin using child region report metadata

    Hi,
    I want to ask for help on how to create custom report plugin using child region report metadata. My idea is to create a child region, a classic report and set the condition to never.
    Then i will query the child report metadata from apex view and use it to create a custom report like using jquery jq-grid. Any idea how i can create a process that will use the child report
    metadata? I dont know how i can create a process just like how apex work, how apex render report, coz i want it to be control using the standard apex report attribute. This plugin will
    render according to the child report attribute.
    Is there anybody here had ever done this?

    Hi Nicolette,
    Thanks for the reply. I know where to find the metadata, just asking for idea on how the rendering process will be.
    Start from determining column heading, column order until finish rendering the report. The same way how apex
    render the classic report.
    Previously this imy my rendering process:
    FUNCTION GETCOLUMN(P_REGION IN APEX_PLUGIN.T_REGION,
                         P_PLUGIN IN APEX_PLUGIN.T_PLUGIN,
                         P_VALUE  IN VARCHAR2) RETURN SYS.DBMS_SQL.DESC_TAB2 IS
        VSQLHANDLER     APEX_PLUGIN_UTIL.T_SQL_HANDLER;
        VCOLCOUNT       NUMBER;
        VCOLNAMES       VARCHAR2(2000);
        VAJAXIDENTIFIER VARCHAR2(100);
        VPAGESIZE       TYPEATTR := P_REGION.ATTRIBUTE_04;
        VJSCODE         VARCHAR2(32767);
      BEGIN
        VSQLHANDLER := APEX_PLUGIN_UTIL.GET_SQL_HANDLER(P_SQL_STATEMENT  => 'select * from s_emp',
                                                        P_MIN_COLUMNS    => 1,
                                                        P_MAX_COLUMNS    => 999,
                                                        P_COMPONENT_NAME => P_REGION.ID);
        VCOLCOUNT := VSQLHANDLER.COLUMN_LIST.COUNT();
        FOR I IN 1 .. VCOLCOUNT LOOP
          VCOLNAMES := VCOLNAMES || '{name: "' ||
                       UPPER(VSQLHANDLER.COLUMN_LIST(I).COL_NAME) || '",';
        END LOOP;
        APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
        RETURN VSQLHANDLER.COLUMN_LIST;
      EXCEPTION
        WHEN OTHERS THEN
          APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
          RAISE;
      END GETCOLUMN;
    So this is how i get the header for my report plugin. The same method is use to get the value / data for each column. This process is work. So now
    i want to extend my plugin so that i will use all attributes from the child report to render my plugin. So the column header, column order, all will depend
    on the child report. And the column display condition is set, it will also check the condition before render the column. Sounds like i want to reinvent
    the normal apex rendering process but this is what i want to achieve.
    I need help to find the correct logic for my render process. Don't want too much for starting, just want to render the plugin correctly, same with child report,
    same columns alias, column ordering and column  conditional display.
    Thanks,
    akulala

  • Error while creating a report that uses Oracle OCI JDBC connectivity

    Please let me know why my CR and LF characters are removed from my forum posting *****
    Hi,
    I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip".  I have successfully created a JDBC OCI connection.
    The connection parameters are given below:
    URL: jdbc:oracle:oci8:@xe
    Database: xe
    username: <userName>
    password: <password>
    I have tested the above connection in Data source Explorer and it works fine!!!
    But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here?  Any help is highly appreciated.
    com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
         at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
         at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
         at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
         at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    Karthik
    Edited by: KARTHIK1 on Oct 14, 2009 9:38 PM

    Hi Ted,
    Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI.  It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
    1) Can you please let me know if there is a way to do this? 
    2) Will it allow data sources using native database driver?
    3) If so, can I use JRC to create these reports from a desktop java program?
    Thanks & Regards
    Karthik
    Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM

  • I want to create a report with more than  64 column's.

    I want to create a report with more than 64 column's. I have generated Query the XML.When I tried to create a template for the report.I have Inserted the colum's Wizard and finish it throughing error message. "you cannot create atable with more that 63 coloum's "

    Hi ,
    Can u Check the below thread
    More than 63 columns in rtf template

  • Create Categories or Perspectives using PL/SQL?

    Hi
    Can you create Categories or Perspectives using PL/SQL?
    I have had a look at the API's section on here but I cant seem to find anything.
    Is it just a simple as adding it to the table?
    Thanx
    Craig

    Here's what I run:
    I ran the query you provided above and here are the results:
    UNLIMITED TABLESPACE
    CREATE TABLE
    Here are the commands I run:
    CREATE TABLE TEST_TABLE AS SELECT * FROM DUAL;CREATE TABLE succeeded.
    DROP TABLE TEST_TABLE;DROP TABLE TEST_TABLE succeeded.
    CREATE PROCEDURE TEST_PROC IS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST_TABLE AS SELECT * FROM DUAL';
    END TEST_PROC;PROCEDURE TEST_PROC Compiled.
    EXEC TEST_PROC; Error starting at line 1 in command:
    EXEC TEST_PROC;
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at , line 4
    ORA-06512: at line 1
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Does this mean I need the CREATE ANY TABLE priv?
    Thanks again everyone!
    -Joe
    Edited by: Joe Bertram on Dec 2, 2009 12:07 PM

  • Creating a text file using pl/sql

    how can one create a text file using pl/sql?
    Say for example abcd.txt in the d: drive
    (d:\abcd.txt)
    on a windows nt server

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by bhrigu nagal ([email protected]):
    thanks for your replies
    I had already set the utl_file_dir parameter
    I tried the utl package and wrote the following code but got some errors
    declare
    filehandler UTL_FILE.FILE_TYPE;
    begin
    filehandler:=UTL_FILE.fopen('d:/intel/','myfile.txt','w');
    utl_file.put_line(filehandler,'look masjdfgsd\n');
    utl_file.fclose(filehandler);
    exception when utl_file.invalid_path then
    raise_application_error(-20023,'bhrigu ,chk the path');
    end;
    the errors
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_FILE", line 101
    ORA-06512: at "SYS.UTL_FILE", line 157
    ORA-06512: at line 4
    if u know what this is please tell me
    thanks bhrigu
    <HR></BLOCKQUOTE>
    U need :
    1) To have UTL_FILE_DIR param in the init file of the instance with the same directory (don't forget to stop and restart the base)
    2) Handled the exceptions listed in the utl_file package (Oracle_home\rdbms\admin\utlfile.sql) in your source.
    3) Turn set serveroutput on in SQL*Plus.
    Run your procedure and see the error message to debug.
    Good luck
    null

  • How to use Pl/sql block to edit check user input

    Hi,
    Please advise on PL/SQL Block code that could be used to Check User input from within a Loop and proceed conditionally based upon User Supplied compliant Input. Thanks in advance.

    Hi,
    yakub21 wrote:
    You could use the ACCEPT to get user input and then assign the input to a variable that could then be verified.
    I believe that anything is possible because we don't yet have proof that it is not!
    I do have code that can accept user input. Is it PL/SQL code? Sybrand was clearly talking about PL/SQL:
    sybrand_b wrote:
    Pl/sql is for server side code, it is not a front end tool, and it is incapable of the functionality you describe.If you do have PL/SQL code that accepts user input, please post an example. A lot of people, including me, would be very interested.
    Pass the user-input value to a variable and then assign that value to another variable from within a Declare of a PL/SQL Block.
    The opportunity here is to figure a way to loop with user input until desired input is entered by the user before proceeding with the code. I'm using PL/SQL Block because I don't want the code to persist. I just want to run it as part of database configuration procedure. ThanksIt sounds like you're talking about SQL*Plus, which is a very poor tool for looping or branching.
    It's possible, but it's not pretty. The following thread shows one way of looping in SQL*Plus:
    Re: How to give the different values to runtime parameters in a loop?

  • Want to create custom report under report field in OEM 11G

    Dear all
    I would like to create custom report on OEM 11G. I have query which is executed and verified from TOAD. But after placed report element it shows an error that table/view not exits. But it doesn't ask any database user name and password.So let me like to know how to do this. I want add more and more reports after the success of this.. Ho can it be done?Please advice.
    Note:-
    The data is getting from OEM repository i think so.. But i need a report which is get data from various apps and system tables. So how to display result from this table and shown to EBS reports.
    Regards,
    Gobinath.R
    Associate consultant
    Petrofac Information Services Private Limited
    Chennai.
    Edited by: Gopinath on May 18, 2012 4:23 AM

    Report should be based on tables in repository database. Mostly sysman tables we will be using for reporting. If you need other database tables then you need to create dblink to those targets in sysman schemas. To my knowledge that's the only way you can refer to other db tables in reports.
    Regards,
    Satheesh Shanmugam

  • I want the create this report but how to???????????????????????????????

    I'm created my oracle10g database with oracle XE databaselink and create view on XE for my customer report. And then create simple report. Everythings ok but when I push the run report report came with all data but I don't want to when push the run button. I want to run and then write customer ID and then push the GO button and then only came to 1 data or info. Can I do this and how???
    Help me please, I'm working about this a few days but I can't do anything :(((
    This is so important for me, help me please...

    Hi,
    OK
    Assuming you are using Page 1 for the report, do the following:
    1 - Create a new HTML Region called "Search" and put this above your report on the page layout
    2 - Add a normal Text item called "P1_CUSTOMER_ID" into the new region - this will be where your user enters in the CUSTOMER_ID value that they want the report to filter by
    3 - Add a Hidden Item called "P1_DISPLAY" into the new region. Set the Default Value for this item to N. If this is 'Y', the report will be shown - if this is 'N' the report is hidden
    4 - Add a button called "P1_SEARCH" into the new region
    5 - Add a button called "P1_RESET" into the new region
    6 - Update your SQL statement to include a WHERE clause:
    SELECT ....
    FROM ....
    WHERE CUSTOMER_ID = :P1_CUSTOMER_ID
    (you may have to do TO_NUMBER(:P1_CUSTOMER_ID) if your CUSTOMER_ID field is numeric)
    7 - Add a branch to the page that branches to Page 1 and sets P1_DISPLAY to Y. Set this branch to be run only when the P1_SEARCH button is clicked
    8 - Add another branch to the page that branches to Page 1 and sets P1_DISPLAY to N. Ensure that this has a higher sequence number than the first branch
    9 - Finally, add a Conditional Display to the report region. Set the Condition Type to "Value of Item in Expression 1 = Expression 2". Enter P1_DISPLAY into Expression 1 and Y into Expression 2
    Regards
    Andy

  • How to manually create a Report Layout using Crystal

    I am trying to create a new layout using Crystal for my Statements using BP Aging .  the out of the box Crystal report for that will not work and it would be easier if i just decide what tables I want to look at.  The problem is i am not sure how to set up the parameters so when i print from the aging it will automatically fill in my parameters with the correct information.  I have already written the report but when i attempt to print from the Aging report it asks me for my perimeters every time.  I tried to look at the out of the box version but it does not even use perimeters so i have no idea how SAP feeds Crystal what information to filter by. I'm using 8.80 PL 16 thank you in advance for any help you can give.
    Edited by: Megan Salem on Oct 31, 2011 5:31 PM

    not really, The system one all comes from some sort of "pld" table and the only designations are the f-numbers (F_124) and i don't have a clue what those are, and when i try to link what should be an the invoice number to the OINV table other things come back blank even when i use left join.  I need some of the information that is provided but i need more than what is currently there so i need the ability to link to the other tables and have it work for every one.  (I'm trying to make it more like the dunnung statement only so it can be run at any moment in time and give the exact amount owed.)

  • I want to create a fillable form using the templates that were in adobe acrobat

    Hi all,
    I am having trouble finding the templates that were offered in the previous version of Adobe. Before, when I wanted to create a form, I could simply click "create form" select from template, and I had access to dozens of varieties of forms. Now when I try the same thing, it only lets me scan in a paper form. I don't have a paper form. That's why I'm trying to make one.
    Any advice would be appreciated, I have tried to search for my question but the help function keeps redirecting me back to "how to prepare a fillable form" and tells me to use a paper document. Why did this simple task become so difficult all of a sudden?
    Thanks in advance,
    Kind regards
    Michael

    That was the FormsCentral designer software. Adobe has decided to discontinue FormsCentral, so it wasn't included with Acrobat DC.
    The usual way to create a form in Acrobat is to create the layout in a program such as InDesign or Word and create a PDF. You can then add the fields in Acrobat, which can attempt to automatically add fields where it thinks they belong.

  • How to resolve the start at work indication while creating a report templateby using CG42?

    Dear Experts,
    I am working as a EHS Consultant , i am doing a assignment for power industry,
    Querry 1.
    While i am creating a report template by using CG42, when am trying to specify the initial status as in work, or release, system is not taking that, its automatically shows start at work. option,
    while i am creating report template i used below steps.
    CG2B-generation varient(Initial satus i had put it as relleased)
    CG42- Edit or create report template.
    I request yo u guide me how to trouble shoot this.
    Querry 2.
    And once i click the document option its given a information that
    A report template is already being edited or displayed at front end.
    I request yo u guide me how to trouble shoot this.
    Thanks with regards
    Vishwanath Hegde

    Dear Viswa
    For Query :2
    Go to Utilities and click on "Rest front end" (refer below screen shot)
    For Query :1
    1) .Once you create the template the initial status will be "Star of work" and you should assign that template to respective Generation variant in CG2b.
    2) Once you go in to report template through Cg42 , if you get above error , go to utilities click on " Rest front end" and edit the template and save the template without any errors , so automatically system status will be changed in to " In process on work station"
    3) Once you finish the template creation with out any errors , you can click on Release , then the template status will be released.
    Balajee

  • Want to Create a Report Server Kindly Help?

    Hello Everyone,
    My name is Sarmad and I am a student of BS(Software Engineering) in 5th semester now. I have assigned a project on 'Oracle Report Server'. My instructor requirements are that it should generate 'Matrix Reports' and i have to use Oracle Database 10g XE. I have researched a lot on Internet and found that following tools are necessary to make a report server on Oracle for Win 7 32 Bit OS:
    1. Oracle Forms and Reports 11g for Win 7 32 Bit
    2. Oracle Web Logic Server 11g (10.3.5) for Win 7 32 Bit
    3. Oracle Data Base 10g XE for Win 7 32 Bit
    Therefore, I installed Data base first and then i installed Web Logic Server and integrated my Data base's sample DB HR within the 'Data Sources' link present in Web Logic Server's Administration Console. Connection test went successful for Web Logic Server and Database. Then i installed Oracle Forms and Reports for Development mode and it also installed successfully on my system.
    Now the issue is that i want to integrate Oracle Reports and Forms services with Oracle Web Logic Server. I don't know how to do that and also i don't have any idea whether i may need any further tools or these are enough to generate reports as i think that there should be some Report Layout builder so that data coming from Web Logic Server should be presented in that layout i.e. Matrix Layout.
    Kindly help me out in this and guide me through.
    Thanks!

    hi
    I am not saying wrong about this question but how can you expect some one to give the code..if you any doubt in terms of logic or if u need any clarification on the functionality how the element behave, the people around here would definitely help you out...
    But straight forward asking the code i believe you might not get the correct answer sometimes..Narrow down your question so that people around here could help you out if they can
    Regards
    Ramesh Kumar S

  • Create a report archive using iBot recurrence/versioning

    Hi,
    I'm trying to set up a report archive. I have an iBot set up that creates a report. Unfortunately the report is written over each time the iBot is run. I'd like to have the iBot create a new report each time it is run. Is this possible? If not, can I create another iBot that somehow saves the previous one and then fires the main iBot to run the report again? Any ideas are appreciated.
    Thanks!
    Nick

    Hi,
    if you're delivering the reports to a directory you can use the following javascript
    (advanced tab). Everytime the iBot is run, a new file will be used.
    var FSO = new ActiveXObject("Scripting.FileSystemObject");
    var fileName = GetConfigurationValue("Log Dir", "iBots") +
    "\\" + JobID + "-" + InstanceID + "-" + UserID + "-" +
    Parameter(0);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    HTH

Maybe you are looking for