Cross tab reports in application express

Hi,
Can a cross tab report be generated with the help of Oracle Application Express?
Lavina

Lavina - you can cheat and create a very simple report like this:
Use a PL/SQL dynamic region. Within your PL/SQL, query the database to get the data in rows rather than columns (which is normally much easier and allows the number of items to be dynamic) and set a cursor on the result.
Start an HTML TABLE block, loop through the cursor once for each column of the resultset and output each row as a table column (i.e. 'sideways', with td tags rather than tr tags, or th tags for the first). You can also put in CSS formatting etc., then close off the table at the end. The idea here is that you build up an HTML table with your data in the cells, and pass it back to the browser using an htp.p() call.
It's a bit crude, and you don't get any of the APEX stuff that goes with the report, but it's OK for very simple reports. We use this technique for creating reports that show the data that was used to generate charts.
John.

Similar Messages

  • Row Headers in Cross Tab Report -Crystal Report XI

    I am trying to create a cross tab report. The report has 4 rows and the columns get generated based on the value of a database field.
    I have 2 questions
    Question 1 : I want the rows to have headers. I insert text objects in the report and when I run the report in crystal, the headers are displaying as required. But when I export to excel, the headers are displayed after the data. How can I create row headers and get them exported to excel as row headers.
    Question 2: I am creating the column based on a database field. The field is of text data type. The sorting for this filed is 1. abc ,10. abc , 11.abc , 2.abc , 3.abc ; etc where abc is a text string. How can I sort the columns so that the columns appear as 1.abc, 2.abc, 3.abc etc.
    I tried using the specified order sorting, but when I check the list of values that it creates to select the values, it is truncating the values. I can only see part of the values from the database.
    Please Help!!!

    I don't have Crystal in front of me so I will try to do this from memory.  If you right click on a report object, there is option on one of the tabs (I think it is General) that says Display String with a corresponding X button.  If you click on that, then you can enter a text expression that overrides the actual value of the report object.
    In your case, if you want to add a static header text to the row data, you could try something like the following:
    if Gender = "M"
         then "Mr. " + CurrentFieldValue
         else "Ms. " + CurrentFieldValue
    where Gender is a field object in the report and CurrentFieldValue is the data object specified for rows in the cross-tab.
    If you wanted to put header on the previous line, you could try something like this:
    "Account ID" + chr(13) + CurrentFieldValue
    where CurrentFieldValue is the account ID string.
    Fuskie
    Who expects this looks nothing like your actual report but hopefully it works as an example...

  • How to create cross tab reports using RAS SDK api with Crystal Reports XI

    Hi Everybody,
    Iam generating reports in a web-based application with Crystal Reports XI using Report Application Server(RAS) SDK API. The columns in my report exceed that of an A4 sized page. So, when I export that report to pdf, only those columns that fit to a page are showing up. To solve, this problem, I thought of using cross tab. But, I donot know how to generate cross tab report using RAS SDK API. I have tried to get some code from the internet. But, I did not find any java code for that.Can some one give me some sample code.It is very urgent.
    Thanks in advance.

    Hi,
    The easiest way I use is to create the worksheet as regular table and then when i verify the data I get (non aggregate) I duplicate it as a cross tab.
    In the duplication wizard I just need to define the axis (using drag and drop).
    if you want to create a cross tab from the beginning you need to define that in the new workbook wizard (check the "cross tab" rather then "table"), chose your fields and define the place you want them.
    The data point (the center of the cross tab) is aggregated as to your machine definition and will happen automatically.
    for example: to find the amount of receipt by months:
    On the left put the "Buyer Name", on top put the "Months" and in the data point put the amount.
    What you'll get is something like:
    months: jan feb mar apr ......
    buyer_name
    jhon_smith 100 50 30 250 ......
    jhon_doe 80 45 90 453 ........
    and so on.....

  • Cross tab report customization

    Post Author: Tejas
    CA Forum: General
    I m devloping the customize application for crystal report which is set the height , width of fields inserted in the report.
    but i got problem to change the width of cross tab report field. i can't find width property of fields which there in the standart report field,
    so how i customize the width of cross tab report.???.

    Hi Diann,
    Try to use the display string by right clicking on total field>format Field>Common tab-->Display string
    and write the formula like
    currentfieldvalue/count(field)
    Regards,
    Raghavendra

  • Crystal Reports Cross-Tab Report not showing all available fields

    I am running CR2008 against MS SQL Express.  I have several tables with fields and data in them and can create standard reports to show all the data in all the fields.  However, when I try to create a cross-tab report, only some of the fields appear for me to choose from.
    I created a standard report with all the fields I needed in my cross-tab report and ran a preview.  Everything was there.  I then added a cross-tab object, selected the tables only to find that fields that are in the main report are not showing up for selection in the cross-tab.

    UPDATE:  I exported the entire database from MS SQLExpress to MS Access and I am having the same issues, so it does not appear to be a problem with the database engine and, since the standard tabular reports show the fields, I am at a loss as to why they don't show up in the cross-tab or the Parameter fields.
    I am creating the cross-tab through the Cross-Tab wizard.  Is there maybe a bug in that?  Is there a way to create it otherwise?

  • Print a report from Application Express direct to a CUPS Printer

    Hi all, I'm new to this technology, is it possible to print a report from Application Express directly to a CUPS Printer? Can someone tell me in laymans terms how to do it? I find the terminology and documentation less than helpful.

    Jeremy,
    BI Publisher handles submitting reports directly to a CUPS printer. However, the APEX integration doesn't currently integrate with that portion of BI Publisher.
    Here's an options:
    Use the Java API of BI Publisher to build a custom Java program that would do this for you. Delivering to CUPS is part of the Java API.
    Bryan

  • Crystal Report Cross Tab Report

    In crystal report 2008, i created a cross tab report. Column shows sales order number and rows show item number.
    For columns that shows sales order #, I also wanted to show sales person name field right beside it. In cross tab expert, I added the field salesperson name.
    However, crystal cross tab shows the sales person at a separate column with duplicate information. I only want to show sales order no. with sales person name under one column. Is there a way to achieve this? Thanks.

    This would be a hard job.
    Have you tried Pivot Table function in Excel? You can play with it and get some ideas.
    Thanks,
    Gordon

  • Cross-Tab Report export to Excel

    I have a cross-tab report that I need to export to excel and keep the same formatting.  When I export the report the first column is Part # the next is operation #.  The report is grouped on Part number, but each part may have multi operation.  When I look at the report in Crystal or as a PDF the part # is at the top then each operation is a seperate row that follows.  When I export it to excel it works fine but instead of the part # appearing at the top then follow by each operation the part number ends up on the last operation in the list.  How can I export this and keep the format the same?  by the way I have tried both xls data only and xls 2007 options

    Hello Experts,
    I also tried to export the CR cross tab report in Excel Data only format.
    Also I want to display Row label i.e. my Rows are different dates so I created a text field and named as Date & Time but when export it to Excel Data Only, the date time label appears 1 row above then rest of the columns. It works good while looking on InfoView but export messed it up.
    Can you please suggest.

  • Sort in Cross-Tab report

    I have a cross-tab report that lists dates as headers and employees as rows. The data at every cell shows the qty (it is like timesheet report). The totals are shown for every row and column. The report layout looks something like this:
    ----------- <date> <date> <date> .... <Total>
    <name> <qty> <qty> <qty> <qty>
    <name> <qty> <qty> <qty> <qty>
    <name> <qty> <qty> <qty> <qty>
    <Total> <qty> <qty> <qty> <qty>
    The report definition looks like this (I numbered the columns to make it easier to write about them):
    01: <?horizontal-break-table:1?>
    02: <?for-each-group@column:EMPLOYEE_TIME;./TRANSACTION_DATE?><?sort:TRANSACTION_DATE;'ascending';data-type='date'?>
    03: <?TRANSACTION_DATE?>
    04: <?end for-each-group?>
    05: <?for-each-group:EMPLOYEE_TIME;./EMPLOYEE_NAME?><?sort:EMPLOYEE_NAME?><?variable@incontext:G1;current-group()?>
    06: <?EMPLOYEE_NAME?>
    07: <?for-each-group@cell://EMPLOYEE_TIME;./TRANSACTION_DATE?>
    08: <?sum ($G1[(./TRANSACTION_DATE=current()/TRANSACTION_DATE)]/TRANSACTION_QTY)?>
    09: <?end for-each-group?>
    10: <?sum ($G1/TRANSACTION_QTY)?>
    11: <?end for-each-group?>
    12: <?variable@incontext:T;.//EMPLOYEE_TIME?>
    13: <?for-each-group@cell://EMPLOYEE_TIME;./TRANSACTION_DATE?>
    14: <?sum (current-group()/TRANSACTION_QTY)?>
    15: <?end for-each-group?>
    16: <?sum ($T/TRANSACTION_QTY)?>
    The XML data is not sorted in any way and the report sorts it by employee and date. As you see at the line 02 I applied the sort by the transaction date. The sort works as expected, however the actual QTY are not showing at correct cells. If I remove sort it works fine but the dates are in random order. I suspect it is because I sort transaction date at header level and the QTY is not aware about it. I tried to apply the sort at line 07 but it does not help.
    Does anyone has any idea how to get this report to display data correctly?

    I have a SR which has associated bug 6131270.
    Here is the latest from my SR:
    UPDATE
    =======
    Hi Tomas,
    The bug has been updated. Development has recommended
    "You also need the patch from bug 4332399 to solve the java.util.EmptyStackException. "
    Please review above bug if you have access.
    Please consider applying Patch 4332399 - XSL:SORT FAILED IN A 2 LEVEL XSL:FOR-EACH-GROUP CASE
    Backport is included in patch 5840358 for EBS customers.

  • How to count number of columns in cross-tab report

    I have created a cross-tab report and have managed to get the data out as below:
                 Jan     Feb     Mar....(display of months will auto expand) Avg/Mo  Total
    UserA     4          3        4                                                                         11
    UserB     6          1        1                                                                          8
    UserC     5          5        5                                                                         15
    Total       15        9        10                                                                        33 
    I want to insert a calculated column (Avg/Mo) into the cross-tab report based on the formula: Total/Number of Months. I used this calculation formula  for Avg.Mo column:
    (GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/GetNumColumns)
    However, I get the wrong average since GetNumColumns count the total number of columns including the column of Avg/Mo and Total.
    How do i get the number of columns, excluding the Avg/Mo calculated column and Total column?
    PS: I can't use hardcode since the number of months/columns will auto expand the months progress...
    Edited by: jutamind on May 26, 2010 9:27 AM

    ok managed to solve this by slightly changing the formula:
    GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/(GetNumColumns-2)

  • How to put report title and page no to appear in multiple pages,when using cross tab reports

    Post Author: shaminranaweera
    CA Forum: General
    I am using crystal reports 9.0 with odbc foxpro database conectivity
    I have designed a cross tab report and it is on the report header part and all the report details  are fine,except that the report title and  and page no's only show on the first page of my report.Pls tell me how can i put my report title and page no on all the pages in my crosstab.

    Post Author: foghat
    CA Forum: General
    You need to put your title in the page header if you want it to appear on every page.  The report header only displays once per report.

  • How to add an image or static text in the header of EACH page of a cross-Tab report

    Post Author: rtutus
    CA Forum: General
    Hi, I use Crustal 11.0.
    I have a cross Tab. I display the items on the left column and the months horizontally, the items are grouped by category field. The values are the sum of quantities are displayed for each month. Like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    The problem, I want to add a page header for each page of the report.
    When Crystal reports first displays my cross-tab in the designer, CR displays the cross tab in the Report header section. I d like to add text or image for each page and not only at the begining of my Cross-Tab.
    If I just add an image or text at the top of the report designer, which is my report header, I get the image or text only on the begining of the 1st page of my report but never in the other following pages.
    If I try to work around the problem and move the cross Tab to a group section instead, and then put the Image in the group header, I get what I want, but the problem is that:
    The columns header: Jan, February....December are displayed for each group of my report and not only in the beginning of the report. I get something like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    You see the months get duplicated. Any way, my real need is to add an image or text in the header of EACH page of a cross-Tab report.
    Thanks a lot for your help.

    Hi Divya,
    you could do for example in the wdDoInit() of the view
    wdContext.currentContextElement().setPicture("picture.gif");
    Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
    I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials.  I have learned tremendously from them.
    Hope this helped
    Harald

  • Dynamically color to each column in Cross-tab report

    Hello All,
    I am a newbie in Crystal report,from last few weeks, i am working on cross tab crystal report.i have a requirement to show color dynamically for each column.i am adding an attachment how i want it. i tried dynamic coloring using object field formula but it is showing red color to all data.i want red color data when in 2nd  cross tab report data is beyond upper or lower limit in first cross tab table. it will be very helpful if somebody will give me any clue on this.... i read so many articles now it seem like impossible for me..:(
    i am using visual studio 2010 and sap crystal report version 13.0.0.99 for visual studio 2010.

    Hello Manish,
    I have attached a sample report that does this. You will need to remove the .txt extension from the attached file to open it as an .rpt file.
    Please right click on one of the value fields of the first cross tab in the report > Format Field > Common > Suppress if Duplicated conditional formula.
    The nested formula is as follows;
    numbervar array l;
    numbervar array u;
    numbervar x:=CurrentColumnIndex;
    if GridRowColumnValue ('@limit') = 'lower limit' then
    (redim preserve l[x];
    l[x]:= tonumber(CurrentFieldValue))
    else if GridRowColumnValue ('@limit') = 'upper limit' then
    (redim preserve u[x];
    u[x]:= tonumber(CurrentFieldValue));
    false
    So it assigns each lower and upper limit value for each client (in the sample it is country) to an array using the cross tabs column index to index the array and it ends in False as we don't actually want it to suppress if duplicated. This nested formula is just used to generate the arrays of upper and lower values.
    In the second cross tab if you again right click on one of the value fields > Format Field > Font > Color you will see the following conditional formula;
    numbervar array l;
    numbervar array u;
    numbervar x;
    if not(tonumber(CurrentFieldValue) in l[CurrentColumnIndex] to u[CurrentColumnIndex]) then
    crred
    else
    crblack
    So this compaes the current field value to range generated by the 2 arrays and assigns a color based on whether or not it is in the range.
    Regards,
    Graham

  • Creation of cross tab report in Bw 3.5 Query designer

    Hi,
      Please tell me the procedure to create cross tab report in BW 3.5 Query designer. Kindly reply as early as possible.
    Regards,
    Hari Phrased B.

    Hi,
    What exactly do you mean by "cross tab report"...do you mean a web report with different tabs?

  • Issue in developing cross tab report with wizard in 10.1.3.2.1

    Hi Gurus,
    We are trying to develope group above cross tab report with wizard in BI Publisher 10.1.3.2.1 .
    i am unable to achieve multiple level columns dynamically.Using cross tab wizard i can achieve single level measure column ,but not the second level column.
    Output should look like this:
    Country1
    Region1 Region2 Region3 --(level1 column)
    d1 d2 d3 d1 d2 d3 d1 d2 d3 -- (level2 column)
    Row1 10 20 30 70 80 90 40 70 90 --data
    Row2 21 24 54 65 23 64 64 76 87 --data
    Here Regions and d1 d2 d3 may vary based on xml data.Also we have page break on country.
    Haven't get any solution till now.
    Also unable to achieve under line and overline on data for total row.
    Need help urgently in this issue.
    Thanks,
    Mahesh
    Edited by: user13450806 on Jan 7, 2011 12:43 AM

    Hi Gurus,
    I am still waiting for some one to help me in this issue.
    It is very urgent for me to solve this. Did not get any help yet.
    --Mahesh                                                                                                                                                                                                                                                                                                       

Maybe you are looking for