How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

Hi all

Suppose I have table, whose structure changes frequently on a daily basis.

For example. / / desc my_table gives you after the name of the column the day 1

SQL > my_table DESC;

Output

Name

Age

Phone


Day 2, two other columns are added, viz, address and salary.

SQL > my_table DESC;

Output

Name

Age

Phone

Address

Salary


Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

For 1 day my XML file should be like this.

<?xml version="1.0" encoding="UTF-8"?>
<dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
SELECT Name
,Age
,Phone
FROM my_table
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_my_table" source="Q2">
  <element name="Name" value="Name" />
  <element name="Age" value="Age" />
  <element name="Phone" value="Phone" />
</group>
</dataStructure>
</dataTemplate>

And my day 1, EXCEL output RTF model should be like this.
Name age phone

Swapnill 23 12345

For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

<?xml version="1.0" encoding="UTF-8"?>
<dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
SELECT Name
,Age
,Phone
,Address
,Salary
FROM my_table
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_my_table" source="Q2">
  <element name="Name" value="Name" />
  <element name="Age" value="Age" />
  <element name="Phone" value="Phone" />
  <element name="Address" value="Address" />
  <element name="Salary" value="Salary" />
</group>
</dataStructure>
</dataTemplate>

And my day 2, exit EXCEL model RTF should be like this.
Name address telephone pay

23 12345 Madrid 100000 Swapnill

Now, I don't know below things.

  • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
  • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

Kind regards

Patricia K.

Post edited by: SwapnilK

Hi guys,.

I was able to solve above the requirement.

I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

Kind regards

Patricia K.

Tags: Business Intelligence

Similar Questions

  • How to create a document based on the name of a file in the file system?

    Hello

    With lots of photos, I like to have a database to collect information on these photos.

    First question is how to generate a record based on a file in the file system?
    for example, the images are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg".
    now, I want to create folders with as one of the attributes of the name of the image (not the image itself). How to create these records (based on information from line-telephony). that is the number of records must be the same as the number of photos.

    any suggestions?
    any response will be appreciated.

    Leo

    Link to create the directory

    http://www.adp-GmbH.ch/ora/SQL/create_directory.html

    You can create a list of files in the directory and read the list of files in this directory.

    [Documentation UTL_FILE | http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]

    [Solution using Java | http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:439619916584]

    SS

  • How to create a report based on the selection of a node of a tree

    Hello

    I am new to Oracle Apex and tried to build a tree and also an interactive report based on column empno from emp table.

    I created a tree based on the emp table. Now, I want to see the records in the employee selected in the tree.

    This is the query of the tree:

    Select case when connect_by_isleaf = 1 then 0
    When level = 1 then 1
    of another-1
    end the status,
    level,
    'ENAME' as the title,
    NULL as an icon,
    'EMPNO' as value,
    NULL as ToolTip,
    NULL as link
    of ' #OWNER # '. " EMP.
    Start by "MGR" is nothing
    connect prior "EMPNO" = "MGR".
    siblings arrested by 'ENAME '.

    Can someone tell me step by step how to go from here?

    I tried to follow the thread Re: question of tree but could not understand a lot of it.

    The approach to reload the page and display the report is fairly simple.

  • You start by creating a new page element that will be used to store the selected node ID, for example. P100_SELECTED_NODE (you can do atext element and change hidden once everything works as expected)
  • Change the query of the tree and the link column in the SQL of tree definition to a link to the same
    for example if your page is 100, you'd do the tree node a link to the same page but the value of the P100SELECTED_NODE with id_ of the node selected
    This is done here
    {message: id = 4410987}
    In this case, it would be

    ' f ? p = & APP_ID.: 100 :'|| : APP_SESSION |': P100_SELECTED_NODE :'|| EMPNO as link

    Now when you click on a link to tree node, it would be back to the same page, but set the P100_SELECTED_NODE with the empno of the clicked node.

  • All that's left to do, change your report so that it refers to the new point inorder to filter records for this employee empno i.e

    SELECT ...
      ..
    WHERE empno= :P100_SELECTED_NODE
    
  • How to make a form with report and a form of inclusion in the same page?

    Hey, guys:

    I was wondering if you could have any link or examples to show how to make a form with report and a form of inclusion in the same page, these two forms are related to the same table. Our customer wants that a user can add a new row to the table in a form and see all lines created by this user in a report, the report should provide link change as well. the problem is: whenever I inserted a new line or change a line or delete a line, and submitted and return to this page, all hidden elements lost their values, this report is empty, and some display only items also lost their values. Could someone give me any suggestions?

    Thank you very much!

    Sam

    So, the problem is essentially with page elements lose their session state values when re-loading of the page. How do you define values for the elements of the hidden page? You have default values defined for those? They are based on the database column? What is the "Source" parameter for these items on the page? It is set to "Always, replace any value in session state"? You have any process of 'Empty the Cache', which is reset these values to null element?

    What is your version of the Apex?

    I would recommend that you have installed for example in apex.oracle.com. This would help to better understand the issue.

    Published by: jaouad khalifi on 13 December 2012 22:11

  • Smartphones blackBerry how to create a new folder in the video folder in the media

    Hi, I'm trying to figure out how to create a new folder in the video folder in the media. I can easily create new folders in the pictures folder, but not in the videos... Why? Thanks in advance for your help.

    well I'm sorry, I think that I have not read your emails correctly.

    The media application doesn't care about records at all. It will read the files, the tags when they are available, playlists, but it will not show the files. with the exception of the pictures.

  • How to create a Viewer without buying the image? I want to be able to save the images I'm looking a subject without purchase or download.

    How to create a Viewer without buying the image? I want to be able to save the images I'm looking a subject without purchase or download.

    After talking to the Customer Service, I now get it. Thank you.

    That is to say: down arrow recorded a watermark image in the gallery without you buy. You can download an overview lores on your desktop for motorhomes with this same arrow, but it is unfortunately a watermark (unlike the DPC). You can also copy and send a link to the Gallery clients to review before you buy.

  • Please how to create an e-commerce using the muse of adobe

    Please how to create an e-commerce using the muse of adobe

    ECWID is certainly the easiest to customize muse and it's very easy for customers to add/manage products. Another thing that many people love in Ecwid, it's that you can host several stores account. If you know css/javascript then you can do this on your own, but if you want a widget that does, make these widgets.

    If you are looking for some great Ecwid widgets, you can enter these ones that are free. And if you are wanting to customize even more (including the ability to host multiple account stores), you can get these even more impressive widgets for $14.99 with promo code: 1MUSESTORE #.

  • How to create checkbox with HTML in the labels?

    How to create checkbox with HTML in the labels?
    If it is possible without the help of APEX_ITEM. BOX?

    Hello

    Yes you can do it. You just need to set * "Escape special characters" = No * in the area of 'Security' of the page box point you. But please be aware that this change could make your application vulnerable to XSS attacks in the case if users are allowed to enter data into the table that is used to fill the entries in the box.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Dynamic action - set a value of element based on the selection of lines of report

    Hi people,

    Does anyone have an example how to set up a dynamic action, which could fill an element with the selected ID based on the selection of line of the report on the same page?

    Demo:
    http://Apex.Oracle.com/pls/Apex/f?p=19543:2

    If I select an item in the report, then I would fill in 'Selected ID' element with the value of the selected report EMPNO line.


    Later, I would use it for the display of parts of master / detail on the same page.

    Thank you very much
    Tomas

    For this sample page, add the following JS code to run when the page is loaded.

    $('.highlight-row td').click( function(){
      //fetch record id from the cell contents of first column in row
      id = $(this).parent().children('td:eq(0)').text();
      //set page item to selected id
      $('#P2_SELECTED_ROW').val(id);
    });
    
  • How to create a shortcut to toggle the sound device?

    Anyone have any suggestions on how to create a shortcut to toggle the USB audio device in Device Manager?

    A shortcut is to enable this device, and the other shortcut is disable this device.

    Thanks for all the suggestions

    Hi oem7110,

    · Why you want to create a shortcut to enable or disable an audio device from Device Manager?

    You will be able to create the shortcut to Device Manager but no shortcut to enable/disable a device in Device Manager:

    a. right-click on the space empty where you want to create a shortcut

    b. click the shortcut

    c. in the type of space empty in devmgmt.msc

    d. click Next and follow the instructions in the wizard.

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to create a document and insert the words and/or art on both sides of the page

    How to create a document and insert the words and/or art on both sides of the page

    How to create a document and insert the words and/or art on both sides of the page

    You create a document by using an application of word processor like Microsoft Word or Corel WordPerfect or OpenOffice Writer.  Think of it as a broad a page roll.

    When you print the document, you can print all pages of the document on one sheet of paper (the normal default value), or you can print on both sides of a sheet of paper.

    Some printers are capable of automatic double-sided printing.  With others, you print all the odd pages and then take the stack of paper, turn upside down and put it back into the printer to print all pages.  You need either to read your printer manual, or experiment a bit to determine if you need to re - organize the first last pages before printing the second side.

  • How to create a new folder in the voice tab 7 hp slate

    How to create a new folder in the voice tab 7 hp slate?

    I wish to cretae a folder in my home page.

    Please help me...

    Hello and welcome to the HP support community!

    You want to organize your icons in folders, or put a shortcut of data on your home page folder?

    The first is easy, this last not so much.

    Just hold your finger on an icon, and then drag it on another similar icon.  A "folder" will be done with the name "unnamed file".  Press and hold the words to change the name of the folder.

    I'm not aware of a way to file a record of data on the homepage...

    WyreNut

  • How to create a restore point in the protection of the system in safe mode?

    As topic the question, how to create a restore point in the protection of the system in safe mode?

    Hello

    read a tutorial on the below link for everything you need to know about the system restore

    http://www.bleepingcomputer.com/tutorials/tutorial143.html

    and read this too

    System Restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

  • How to create my electronic signature for the first time

    How to create my electronic signature for the first time

    Hi debbieh62171891,

    You can fill feature & signature to create a Signature in Adobe Reader. If you want to create a Digital Signature using Adobe Reader you must then a PDF form with signature inside and drive field expanded licence fees. In this case, when you click the signature field it will take you with the process of creating a Digital Signature.

    Thank you

    Abhishek

  • I need to update the screenshots for a new version of an app existing Itune application to download a new version. Since I did not create the original version, can you guide me how to create a new version with the new version number?

    I need to update the screenshots for a new version of an existing iTunes Connect App asks me to download a new version. Since I did not create the original version, can you guide me how to create a new version with the new version number?

    You must call the assistance of the company and ask them to help you with this. You can find contact information by logging on http://digitalpublishing.acrobat.com/ and looking at the Middle at the bottom of the page.

    Neil

  • How to create drop down menus in the main menu?

    How to create drop down menus in the main menu?

    such as:

    1 menu 2 menu 3 menu 4

    menu one

    menu b

    menu menu menu x c y menuz

    menu d

    I have the top menu, but don't know how to get the submenus

    Help you to appreciate in advance

    You must set the 'Pages' menu preferences:

Maybe you are looking for

  • Web cache does not

    My web cached in advanced options content always shows that he uses "0 bytes of disk space." It's a bit like DuraShock fuel that always shows empty. How can I do display the size of the cache again?

  • Why extensions are hidden in firefox 10?

    no extensions in firefox 10

  • Laptop does not start: error BCD on Acer Aspire M3-581

    Hello Acer Aspire M3 581PTG my son has stopped booting.  At the start, immediately after the Acer logo, it now shows a blue screen with the message: Recovery Certain required information does not appear in the data of Configuration startup file. File

  • How to maintain the life of your printer

    It seems more common that everyone feared how to maintain the service life of the cartridges from the printer itself.  As many variations of parameters and environment may play a role in how long your ink will actually last. A more official document

  • End of connected HP disc. Whatever that means for Onedrive?

    I currently use OneDrive through all my devices and computers. Player HP connected to end its service, Onedrive will continue its service? Can I backup everything onedrive to my computer?