Vertical Report PPR

Is it possible to create a vertical PPR report with auto refresh?

Hello Tharpa,
>> I have a vertical report … Heading Alignment … Any idea how to get these to be left-aligned?
It seems that the column headlines in vertical reports are aligned based on a specific CSS class - TABLE.vertical1 TD.L .
Create your own CSS class with the same name, and give the text-align attribute any value you need.
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • Creating a Vertical report

    Hi
    I have an SQL query that returns data like this
    Col1 Col2
    text1 1234
    text2 4321
    I have created a report region based on the SQL query, and using the builtin report template "default vertical report, look1",. This shows the data like this:
    Col1 Text1
    Col2 1234
    Col1 text2
    Col2 4321
    But what I want is this:
    Col1 Text1 Text2
    Col2 1234 4321
    In other words, I want all the rows from the query to be displayed vertically, across the page. Is this in any way possible?
    I have looked into creating a custom report template, but having been able to figure it out. The Apex users guide, is quit silent on how to do this.
    Regards, and thanks in advance for any help
    Søren

    Smors,
    Here is a package that will let you create pivot results whatever the table is. You might have to change the size of the variables to suit your needs ...
    CREATE OR REPLACE PACKAGE PIVOT AS
    TYPE REFCURSOR IS REF CURSOR;
    TYPE ARRAY IS TABLE OF VARCHAR2(30);
    PROCEDURE PIVOT (P_MAX_COLS IN NUMBER DEFAULT NULL,
    P_MAX_COLS_QUERY IN VARCHAR2 DEFAULT NULL,
         P_QUERY IN VARCHAR2,
         P_ANCHOR IN ARRAY,
         P_PIVOT IN ARRAY,
         P_CURSOR IN OUT REFCURSOR );
    END;
    SHOW ERRORS
    CREATE OR REPLACE PACKAGE BODY PIVOT AS
    PROCEDURE PIVOT (P_MAX_COLS IN NUMBER DEFAULT NULL,
    P_MAX_COLS_QUERY IN VARCHAR2 DEFAULT NULL,
              P_QUERY IN VARCHAR2,
              P_ANCHOR IN ARRAY,
              P_PIVOT IN ARRAY,
              P_CURSOR IN OUT REFCURSOR ) AS
    L_MAX_COLS NUMBER;
    L_QUERY LONG;
    L_CNAMES ARRAY;
    BEGIN
    IF (P_MAX_COLS IS NOT NULL) THEN
         L_MAX_COLS := P_MAX_COLS;
    ELSIF (P_MAX_COLS_QUERY IS NOT NULL) THEN
         EXECUTE IMMEDIATE P_MAX_COLS_QUERY INTO L_MAX_COLS;
    ELSE
    RAISE_APPLICATION_ERROR (-20001, 'Cannot figure out max cols');
    END IF;
    -- NOW CONSTRUCT THE QUERY THAN CAN ANSWER THE QUESTION FOR US...
    -- START WITH THE C1,C2 ... CX COLUMNS
    L_QUERY := 'SELECT ';
    FOR I IN 1..P_ANCHOR.COUNT LOOP
    L_QUERY := L_QUERY || P_ANCHOR(i) ||',';
    END LOOP;
    -- NOW ADD IN THE C(x+1)... CN COLUMNS TO BE PIVOTED
    FOR i IN 1..L_MAX_COLS LOOP
    FOR j IN 1..P_PIVOT.COUNT LOOP
    L_QUERY := L_QUERY ||
         'MAX(DECODE(RN,'||i||','||
    P_PIVOT(J)||',NULL)) ' ||
    P_PIVOT(J)||'_'||i||',';
    END LOOP;
    END LOOP;
    -- NOW JUST ADD IN THE ORIGINAL QUERY
    L_QUERY := RTRIM(L_QUERY,',')||' FROM ('||P_QUERY||') GROUP BY ';
    -- AND THEN GROUP BY COLUMNS...
    FOR I IN 1..P_ANCHOR.COUNT LOOP
    L_QUERY := L_QUERY || P_ANCHOR(i) ||',';
    END LOOP;
    L_QUERY := RTRIM(L_QUERY,',');
    INSERT INTO X_TAB VALUES (L_QUERY);
    COMMIT;
    -- AND RETURN IT
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURSOR_SHARING = FORCE';
    OPEN P_CURSOR FOR L_QUERY;
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURSOR_SHARING = EXACT';
    END;
    END;
    SHOW ERROR
    BEGIN
    PIVOT.PIVOT(
    P_MAX_COLS_QUERY => 'SELECT MAX(COUNT(*)) FROM EMP GROUP BY DEPTNO,JOB',
    P_QUERY => 'SELECT DEPTNO,JOB,ENAME,SAL,ROW_NUMBER() OVER
         (PARTITION BY DEPTNO,JOB ORDER BY SAL,ENAME ) RN
    FROM EMP A',
    P_ANCHOR => PIVOT.ARRAY ('DEPTNO','JOB'),
    P_PIVOT => PIVOT.ARRAY ('ENAME', 'SAL'),
    P_CURSOR => :X );
    END;
    Keep Smiling,
    Bob R

  • How to create a vertical report

    I am new to Application Express. I am trying to create some basic financial reports using it (e.g. Income Statement, Balance Sheet). Typically, these reports are organized vertically where each quarter's financial data is displayed as a separate column. Can someone point me in the right direction on how to create these types of reports using Application Express?
    I did play with the "vertical report, look 1" report template. When I used this each record was oriented vertically instead of the default horizontal orientation, but the records appeared in individual tables instead of one large table with multiple columns.
    Here is an example of the type of report I am trying to create: http://finance.yahoo.com/q/is?s=ORCL
    Thanks in advance.

    Hi Jim,
    You can do this if you create a custom Row Template. I don't have your tables, so the following is based on:
    SELECT ENAME, SAL, COMM FROM EMP ORDER BY 11 - Go to Shared Components, Templates
    2 - Click Create
    3 - Select Report
    4 - Select From Scratch
    5 - Enter a name for the template, select any template class (eg, Custom 1) and select "Named Column (row template)"
    6 - Click Create
    Now edit the template and use the following settings:
    Row Template 1
    <td align="right" style="width:200px;">#1#<br>#2#<br>#3#<br></td>Before Rows
    <table>
    <tr>
    <td align="right">Name<br>Salary<br>Commission</td>After Rows
    </tr>
    </table>The pagination settings can be copied from a report template of your choice
    Attach the new template to your report and run the page. The Before Rows html will be rendered first, then for each "row" in the report a new TD cell is created with all the data for that "row" (note that #1#, #2# and #3# refers to columns 1, 2 and 3 - so, in this example, that's ENAME, SAL and COMM respectively) and, after the maximum number of rows per the report settings has been reached, the After Rows html is added, thereby completing the row.
    Obviously, you'll have to add in your own styling and change the above to suit your specific needs, but that should give you a starting point.
    Andy

  • Vertical report cell with multiple values

    I have a database table that looks something like this:
    Order_ID Product_Name
    .....1................X.........
    .....1................Y.........
    .....1................Z.........
    Right now, when I create a vertical report using one of the provided templates and use groupings the report comes out like this:
    Order ID: 1
    Product Name: X
    Product Name: Y
    Product Name: Z
    I am trying to create a verticle report that looks something like this instead:
    Order ID: 1
    Product Names: X, Y, Z
    Is there a way to do this by creating a custom report template? If so could someone show me or point me to an example. If not, how would something like this be achieved?
    Thanks!
    - Brian

    With report template you can’t do that
    But create function that returns all the Product Name values in string

  • Report Template Help - Vertical report with multiple rows on the same line.

    I am tearing my hair out trying to figure a way to do this. I want a vertical report, but with the rows across the page rather than down it.
    e.g.
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5Has anyone managed to do this?

    Use a custom named column report template. The template could generate either:
    <li> a table with one physical <tt>tr</tt> row, with your "columns" being the logical "rows" of the report rendered as the <tt>td</tt>s within the row
    <li> a list of lists using CSS to render them side-by-side via <tt>float</tt> or <tt>inline-block</tt> (Some examples of similar techniques)

  • Creating vertical reports with alternating colored rows

    I wanted to create a vertical report with alternating colored rows. Creating a vertical report template was not a problem but I am not able to use different bgcolor for alternating rows.

    As I mentioned above, I used the follwoing code to generate the vertical report BUT i could not get the alternating rows in a diffrent color:
    Before Rows:
    <table class="default2">
    Before Each Row:
    OMIT
    Column Template 1
    <tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td width="500">#COLUMN_VALUE#</td></tr>
    Column Template 1 Condition
    Use for Odd rows
    Column Template 1
    <tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td bgcolor="#FFFFFF" width="500">#COLUMN_VALUE#</td></tr>
    Column Template 1 Condition
    Use for Even rows
    After Each Row
    OMIT
    After Rows
    </table>

  • Converting Vertical Reports to PDF

    Hi all,
    I created a vertical report on a table because there are many columns in that table. I am trying to convert that table to a PDF file. However, the built in printing capability doesn't seem to support printing vertical reports, it only prints the table in horizontal format, which is not what I want.
    Is there any way to help me achieve what I want to do?
    Thanks!

    Shared components, Report Layouts, Create, Generic Columns (is an easier layout..) Then you give it a name.. You will need to either know ho wto format the xsl-fo or buy a tool to do the visual layout for you..
    That is why BI Publisher is such a blessing...
    Thank you,
    Tony Miller
    Webster, TX
    A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
    "I didn't know there were any witnesses", I replied " Now I'll have to kill you too"

  • Anyone have the XSL-FO for default: vertical report, look 2

    Hello everyone,
    I have a report with the default: vertical report, look 2 used to display the data. I want to export this as a PDF.
    The only option I have is "default", and that gives me a single row of header and data, that over-runs the buffer.
    I want to export the PDF in the same format. Does anyone have the XSL-FO for default: vertical report, look 2?
    Thanks!!

    Why did you continue the process of purchasing the accessories and phone if you could have proved the phone did work by going home and charging the device? That is not the reps job. You need to come prepared to the store if you want to get the most for the trade in.
    Any who here ya go:
    Verizon Communications Inc.
    140 West St
    New York, NY 10007

  • Vertical report with two columns

    I have table with picture. I can display common sql report(horizontal or vertical). Is it possible to display this to two columns (eshop).Two vertical columns (for example field of records 10x2).
    Message was edited by:
    user542927

    Hi,
    There are probably a number of ways that you can handle this, but the underlying principle for all of these would be that you need to have 2 reports. The first report would contain the first ten records and the second report would contain the next ten.
    The way to do that would be to get the ROW_NUMBER() value for each line and, in the query defintion for each report, you would have a WHERE clause that restricted the results based on this value. The best way to do this would be to create a view and base the reports on this view. The view definition would include:
    ROW_NUMBER() OVER (ORDER BY xxxx) AS ROW_NUMBER
    where xxxx is the same order definition as the main ORDER BY clause. Each row will then get a ROW_NUMBER value that matches it's position in the query resultset.
    Your first report would then have a WHERE clause of:
    WHERE ROW_NUMBER < 11
    the second report would have:
    WHERE ROW_NUMBER BETWEEN 11 AND 20
    The final step would be styling/positioning the reports. The first would probably be in Column 1 in the region and the second in Column 2. You would almost certainly have to adjust the styling and/or positioning using a style attribute in the region/report definitions.
    Regards
    Andy

  • Vertical Reporting against dimension

    Hi,
    My client has a dimension table that is 1:1 with fact table for demographic info of each fact record (i.e., Gender, Ethnicity, etc), having separate columns for each demographic.
    On the reporting side, they want to show these categories and values vertically and pivot with year to show measures like this:
    ................................2008.....2009
    Gender....Male..............123.......456
    .............Female...........123.......456
    Ethnicity..White.............123.......456
    .............Black.............123.......456
    .............Asian............123.......456
    Problem is there is no 'Category' column, and also these values for each category are in separate columns. Is there a way to do this report in Answers or RPD? If not, is there anything that can be done to the data model without increasing the number of rows?
    Thanks

    If the categories are not too many (for example 3 or 4) and composed by 2 fields with the same format (varchar)
    You can use in Answers the option "Combine with similar Request"
    So your answer will be:
    select 'Gender', Dim.gender,Year, qty
    Combine with similar Request
    select 'Ethnicity', Dim.Ethnicity,Year, qty
    Then you will have to do the pivot table...
    Edited by: Francesco on Aug 10, 2010 3:43 PM

  • Indenting Column Headings for a Vertical Report - Carl, can you help pls.

    Hi,
    For a SQL Query region, under Report Attributes, is it possible to indent certain Column Headings somehow in order to achieve the following result:
    Test1 : A
    --------Sub Test1a : A1
    Test2 : B
    Test3 : C
    --------Sub Test3a : C1
    --------Sub Test3b : C2
    Test4 : D
    etc...
    So based on the above, I would like to be able to indent 'Sub Test1a', 'Sub Test3a' and 'Sub Test3b'. I have tried ' '  as well as <pre> Sub Test1a</pre> but unfortunately no go.
    Can anyone pls assist.
    Thanks.
    Tony.
    Message was edited by:
    tfatouro

    Try setting the column heading alignment to "Left" and then
    Test 1 : A&lt;BR/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sub Test 1a : A1
    Message was edited by:
    amaline

  • Vertical single item Report

    Hi,
    I have a small app where I register clients for demo.
    After I register them, I need to send them a registration confirmation with all the details (Location address, and details of demo)
    The process is:
    1) I use a form to enter their registration data,
    2) I place all registrations in a standard (table-like) report.
    My goal is:
    In the registration summary report (in point 2 above) I would like to have a link for each row, so that when that link is clicked, that specific item is shown in a vertical report that I can download in PDF and send to client as an attachment.
    is there a way to produce a report that includes one row of a table? My gues would be to have an SQL statement that fires using the selected item id (taken from the link column), and feed that row to the report.
    Please help
    Edited by: user13813605 on Feb 9, 2011 5:42 AM

    Hi,
    I think that is down to the Report Layout option on the Print tab for the report region. You would need to create a layout that can be used in place of the Default Report Layout option. By default, the output is pretty much a datadump from the data.
    I've never actually created a Report Layout - as far as I understand it, you have to design a layout document as either a RTF file or XSL-FO file and then upload this through Shared Components, Report Layouts.
    XSL-FO is similar to XML - see: http://www.w3schools.com/xslfo/default.asp - there are some threads that show examples (whether or not they work, I don't know, but they show the sort of structure you need in a file - eg, How to Print in PDF using XSL-FO with FOP  ???? )
    RTF can be generated by Word or similar apps. An example: http://docs.google.com/viewer?a=v&q=cache:zfEw84o8Re4J:www.expobadge.com/dldev/dc/DKLLoader1.cfm%3Fdcid%3D919%26type%3Dpdf%26aid%3Dace3f4dd-2baa-4ba9-ad6c-099ce814bfba%26caller%3Das1%26shownumber%3D8027+%22application+express%22+%22rtf%22+example&hl=en&gl=uk&pid=bl&srcid=ADGEESgzSCp6lAUv7VFkDGjQM0-mwzahiN0hxxQp3m5KyrOlJlBmR2mow1gYJdnWJxPhPuvJ0GhubWhwmRYNU-9IgIGrk88NQMfrpegR4DDdGQzTvaKT1r6ZgTX3zIB_1nCgBDEZd35B&sig=AHIEtbRKcs8kLQbEGnZ7ct43WfSVnZtRmg - note though that this example requires a paid-for plug-in for Word, but may give you an idea of what is required.
    Andy

  • Report Custom Vertical Table Question

    Hello Guys,
    I am trying to display some data in a custom vertical table (for a report). The data that I have looks like this :
    Customer number          Name               Product          Age
    123               John Customer          Checking     50
    456               Jane Customer          Savings          40
    When I display it using a vertical table (or attribute value pairs) the data looks like:
    Customer number: 123
    Name : John Customer
    Product: Bank Account
    Age: 50
    Customer number: 456
    Name : Jane Customer
    Product: Bank Account
    Acct No: 40
    But I want to display the data like this:
    Customer number: 123 456
    Name : John Customer Jane Customer
    Product: Bank Account Bank Account
    Age: 50 50
    The option here is to change the data to dynamic columns rather than dynamic rows. I tried manipulating the templates but it would not do it. Any other suggestions?
    Thanks!

    Hi Badri,
    OK - this is what I did (there's no documentation as such, so I'll just give you the step-by-step guide here!):
    1 - In your application, go to Shared Components then Templates
    2 - Click the Create button
    3 - Click the "Report" option
    4 - Select "From Scratch" and click Next
    5 - Enter a name for the new template (for example, "Vertical Report"), leave the Theme as your current theme, set Template Class to "Custom 1", tick the "Named Column (row template)" option and click Create
    This creates a new blank report template - scroll down the list of templates to this new one and click on the name to edit it.
    In there, you need to enter the following:
    Row Template 1 setting:
    &lt;td&gt;
    &lt;table cellpadding="0" border="0" cellspacing="0" summary="" class="t18Standard" style="border-collapse:collapse"&gt;
    &lt;tr&gt;&lt;td class="t18Data"&gt;#1#&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td class="t18Data"&gt;#2#&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td class="t18Data"&gt;#3#&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td class="t18Data"&gt;#4#&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;NOTE: In my example report, I show four columns (EMPNO, ENAME, SAL, COMM) - these are refered to as #1#, #2#, #3# and #4# above (#1# means column number 1, #2# is column 2 and so on - but use the column numbers not the names in your template). If you have a different number of columns add in or remove lines of: &lt;tr&gt;&lt;td class="t18Data"&gt;#nn#&lt;/td&gt;&lt;/tr&gt; (replacing nn with the column number)
    Leave all other settings in the Row Templates section blank
    Before Rows setting:
    &lt;table cellpadding="0" border="0" cellspacing="0" summary="" style="border-collapse:collapse;"&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;table class="t18Standard" cellpadding="0" border="0" cellspacing="0" summary="" style="border-collapse:collapse;"&gt;
    &lt;tr&gt;&lt;th class="t18ReportHeader"&gt;EMPNO&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th class="t18ReportHeader"&gt;ENAME&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th class="t18ReportHeader"&gt;SAL&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th class="t18ReportHeader"&gt;COMM&lt;/th&gt;&lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;NOTE: You will need one TR tag for each of the column headings - I have four here (EMPNO, ENAME, SAL and COMM) - add or remove lines of &lt;tr&gt;&lt;th class="t18ReportHeader"&gt;COLUMNNAME&lt;/th&gt;&lt;/tr&gt;
    After Rows setting:
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;table&gt;
    &lt;tr&gt;
    &lt;td&gt;
    #PAGINATION#
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;Leave all settings in the Pagination section blank
    NOTE: Any "class" name used above assumes that you are using Theme 18 (t18Standard is the standard report style class, for example) - you will have to update these to match your own theme
    Click Apply Changes to save this
    Now go back to your page and click on the "Report" link for your report region - this takes you to Report Attributes. Scroll down to the "Report Template" setting and change this to your new template. Click Apply Changes to save that.
    When the page is rendered, a new table will be created for the report, the headings will be created within another table in the first TD on that table. All data lines are created as separate tables within new TD tags - this makes the output go across the page instead of down.
    Andy

  • Print Report to PDF with columns vertical instead of horizontal

    I enabled report printing for a report region but the PDF lists the columns horizontally even though the columns are listed vertically on the report page. Is there a way to list the columns vertically on the PDF so that it matches the layout on the report page. Thanks for your help.

    Hi hhsu68
    Wondering how you are arranging columns listed vertically on the report page?
    You mean just selecting any vertical report template, or
    you mean just column headers are vertical and the data as normal (horizontal)?
    If its the second case could you please let me know how you did that?
    Off course I would also like to know if you have found a solution to your problem as well.
    Thank you
    Ligon

  • Vertical Column Report in OBI Publisher

    Hi All,
    I have a requirement to create a Vertical Report (column) detail report of employees loan deduction (January -December). The report should be in vertical format.
    Emp_No    Name       Jan     Feb    Mar    April   > >>>>>> Total
    can anyone help me plz..
    thanks,

    Hi,
    I solved the problem,
    i wrote a query and i got my result.
    check below :
    select
          TO_CHAR(TRANS_DT, 'YYYY') AS RECO_YR , emp,
         sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =1 THEN adv_amt  ELSE 0 END ) AS Jan,
          sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =2 THEN adv_amt ELSE 0 END ) AS FEB,
           sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =3 THEN adv_amt ELSE 0 END ) AS MAR,
            sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =4 THEN adv_amt ELSE 0 END ) AS APR,
             sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =5 THEN adv_amt ELSE 0 END ) AS MAY,
              sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =6 THEN adv_amt ELSE 0 END ) AS JUN,
               sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =7 THEN adv_amt ELSE 0 END ) AS JUL,
                sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =8 THEN adv_amt ELSE 0 END ) AS AUG,
                 sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =9 THEN adv_amt ELSE 0 END ) AS SEP,
                  sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =10 THEN adv_amt ELSE 0 END ) AS OCT,
                   sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =11 THEN adv_amt ELSE 0 END ) AS NOV,
                    sum (CASE WHEN TO_CHAR(TRANS_DT, 'MM') =12 THEN adv_amt ELSE 0 END ) AS DEC
       from
          Hrt_Loan_Reco
              where emp='11155'
               group by
         TO_CHAR(TRANS_DT, 'YYYY'), emp
       order by
              RECO_YR, emp
    hope it will help someone...
    thanks

Maybe you are looking for