Restricting data in cross tab report

Hi
I am creating a cross tab report.In that I want to restrict the column dynamically.The column depends upon the parameter field.
say for example if i enter the parameter as 2007,it should display field from 2004-2007 only rather than displaying all years.
Thanks in Advance,
Eswari

Hi,
You can use a formula. e.g
< Basic format>
Select case year({Command.tradeDate})
    case 2005 to 2007
        formula = 1
    Case else
        formula = 0
end select
Then on the crosstab column group options, choose "specified order" and on the "Other" tab choose "Discard all others"
Hope this helps
Regards
Dotun.

Similar Messages

  • Unable to get cells for the columns which have no data in cross-tab report

    Hi friends,
    I am developing a cross-tab report.
    Let's take an example to explain the problem.
    Here is the XML file i am using
      <?xml version="1.0" ?>
    - <!--  Generated by Oracle Reports version 6.0.8.11.3
      -->
    - <MODULE1>
    - <LIST_G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171091</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171091</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Loans To Govt</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171093</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>120</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171093</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Loans To Govt</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>*171095*</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>100</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
      </LIST_G_SCHEMECODE>
      </MODULE1>Now I want SCHEMECODE in rows and ASSET_TYPE in columns.
    And the each ASSET_TYPE column is to be divided into 2 sub-columns (MARGIN,AMOUNT_SECURED).
    I am able to achevie this.
    The problem is that ,for the schemecode 171095, since there is no data for ASSET_TYPE "Loans To Govt",no cells are generated for this SCHEMECODE and ASSET TYPE.
    But the requirement is to generate blank cells.
    If needed i will send the template at xml files also.

    try this, there must be simpler one i guess...
    1. take a form field, and make its type as number. Paste the below one <?xdoxslt:set_variable($_XDOCTX,'v1',2)?>
    2. now take a table with as below,
    A l B |
    C l D1 l D2 l E1 l E2 l
    observe that i. A, C are in one column
    ii. cell B is on top of D1, D2
    iii. we have no cell on top of E1 and E2 cells
    iv. 'l' represents the wall of the cell :)
    A: <?horizontal-break-table:1?> SCHEMECODE
    B: <?for-each-group@column:G_SCHEMECODE;ASSET_TYPE?> <?ASSET_TYPE?> <?end for-each?>
    C: <?for-each-group:G_SCHEMECODE;SCHEMECODE?> <?xdoxslt:set_variable($_XDOCTX,'v1',2)?> <?SCHEMECODE?>
    D1: <?for-each-group@cell:current-group();ASSET_TYPE?> <?MARGIN?> <?xdoxslt:set_variable($_XDOCTX,'v1',xdoxslt:get_variable($_XDOCTX,'v1')-1)?>
    D2: <?AMOUNT_SECURED?> <?end for-each?> <?end for-each?>
    E1: <?for-each@column:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX,'v1'),1)?>
    E2: <?END FOR-EACH?>
    3. If you are confused gimme your email id, i will pass the template. But you should add credits to me.. :)

  • Cross-Tab Report Custom Date

    Hello everyone,
    I need some help with changing the date interval in Cross-Tab Reports.
    I ran the report annually; however, the dates I want to run is really specific.
    How can I change the date intervals? Is this possible?
    Date below are 01/01/12 - 12/31/12, 01/01/13 - 12/31/13, 01/01/14 - 05/28/14. Instead of this I want to run the report 05/28/12 - 05/28/13.
    05/29/13 - 05/28/14

    Ido,
    Thanks for your reply.
    Is this how the formula should look like?
    If CDate({ORDR.DocDate}) >= Cdate("05/28/2012") and Date({ORDR.DocDate}) <= Cdate(
    "05/27/2013") then
    {RDR1.Quantity}

  • Sorting by date in columns cross tab report.

    Hi all,
    I am working on a cross tab report in BI Publisher in which columns are generated dynamically in a pivot table depicting months as Jan 09 , Feb 09.... but data type is char.When displayed in pdf, columns are generated sorted alphabetically.
    How can I have them sorted by date in final pdf?
    or
    How can I stop the columns being sorted in pivot table at template level?
    Thanks.
    Edited by: user9061488 on Jul 21, 2010 1:13 AM

    You need to get a extra column in the query just for sorting purpose, which will have month number in it or YYYYMMDD. format, so that , it can be used in only for sorting.
    with JAN 09, FEB 09 , we can do it, but it will be little complex

  • 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)

  • 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

  • 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                                                                                                                                                                                                                                                                                                       

  • How to Add new column in cross tab reports

    I am using crystal reports 10
    I created cross tab report for monthly sales. I need to add one more column in that report
    ex:
    Month   Customer    Part1  Part2    Part3      
    Jan         A               10       12         15        
    Jan         B                20      0           10        
    Jan         C               0         3           5          
    Feb        A               5         10          8          
    Feb        D               55        23        33        
    In above data Parts are no limit, thatswhy i am taking cross tab report.
    I am taking Month and Customer name as Rows,
    Part Codes as Colums,
    Quantiry as Total fields in cross tab Report.
    Here month field is storing as Transaction date in database, I am calculating by month
    I am getting upto this.
    User needs add one more field is Invoice no
    Month   Customer    Part1  Part2    Part3        Invoice no
    Jan         A               10       12         15          B1,B2,B3,B4
    Jan         B                20      0           10         B12,B30
    Jan         C               0         3           5           B6
    Feb        A               5         10          8           B35,B40
    Feb        D               55        23        33          B25,B56
    How to add invoice nos by group wise(By customer and  By month)
    Thank you.
    Raja shekar Reddy K.
    Edited by: Raja shekhar Reddy on Apr 16, 2009 5:10 PM

    Dear Amogh,
    Thanks for u'r  Replay.
    If i use new crosstab for Invoice no each invoice number can display like seperate columns.
    But I need Invoice  no in single column with seperate with "," or "/".
    Thanks & regards,
    Raja Shekar Reddy K.

  • Totals in Cross tab report

    Hi All,
    I have created a cross tab report and in this report there are 8 sub-totals.
    I need to total up the first 7 sub-totals and one more total summing up the first 8 sub-totals. Is there any in-built functions to do this.
    Thanks in advance
    Dhinesh

    Look at the Total Wizard. You should be able select the right options to have totals at different level of the data. Also give us an example what you want to achieve.

  • Cross Tab Report

    Hi,
    I'm creating a report in Crystal 2008 for SAP Business One. This report is a sales report and i want to pull the data  from three tables namely Invoice Rows, Credit Memo Rows and Down Payment Invoice Rows. Other selections in the report include the Posting Periods table, Items Group Table and the Items Master Data table.
    I'm considering a cross tab report displaying the Items Group on the Row level and the Posting Periods on the columns with Sum of row totals for item groups per items on invoice,credit memo or down payment.
    I need help regarding the kind of joining is needed to ensure that i get a correct and good report showing total sales made for item groups per period. Thus, total sales = Invoice+Downpayment - Credit Memo
    Thanks.
    John

    You can also user OJDT as the base and left join it to the Invoice, Credit note and Downpayment tables by linking DocEntry and the object tpye.
    With this option, you need to use IF statement to read information based on object type.
    Using command as suggested is simpler.  However, my preference is to use command alone. 
    Linking Command with Tables seems to have slower performance.

  • 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...

  • Unable to convert the RDF layout to RTF Layout for cross tab report

    Hello All,
    I have a RDF, which has cross tab layout. For this I need to create RTF template.
    I have the XML file. I'm not able to get the cross tab report in RTF as RDF.
    Below is the part of XML data.
    Pleaes let me know how do i achive this.
    <?xml version="1.0" ?>
    - <!-- Generated by Oracle Reports version 6.0.8.27.0
    -->
    - <XXAQS_EXPENSE_COST_DIV>
    - <LIST_G_CS_1>
    - <G_CS_1>
    - <LIST_G_2>
    - <G_2>
    <DEPT>11100</DEPT>
    - <LIST_G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>501010000</ACCOUNT>
    <DESCRIPTION>Salaries</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>100126</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>501020000</ACCOUNT>
    <DESCRIPTION>Overtime</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>14811</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>501030000</ACCOUNT>
    <DESCRIPTION>Bonus</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>28968</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>502000000</ACCOUNT>
    <DESCRIPTION>Allowance</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>502010000</ACCOUNT>
    <DESCRIPTION>Food Allowance</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>502020000</ACCOUNT>
    <DESCRIPTION>Housing Allowance</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>15612</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>502030000</ACCOUNT>
    <DESCRIPTION>School Fees Allowance</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>1249</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>502040000</ACCOUNT>
    <DESCRIPTION>Other Allowance</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>1873</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>503000000</ACCOUNT>
    <DESCRIPTION>Sales Incentive and Commissions</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>503010000</ACCOUNT>
    <DESCRIPTION>Sales Incentive</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>503020000</ACCOUNT>
    <DESCRIPTION>Sales Commissions</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504000000</ACCOUNT>
    <DESCRIPTION>Employee Expenses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504010000</ACCOUNT>
    <DESCRIPTION>Vacation Pay</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>8636</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504020000</ACCOUNT>
    <DESCRIPTION>Air Tickets</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>5265</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504030000</ACCOUNT>
    <DESCRIPTION>End of Service</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>26367</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504040000</ACCOUNT>
    <DESCRIPTION>Medical Expenses</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>15441</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504050000</ACCOUNT>
    <DESCRIPTION>Contract Labour</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>2500</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504060000</ACCOUNT>
    <DESCRIPTION>Recruitment Expenses</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504070000</ACCOUNT>
    <DESCRIPTION>Visas Expenses</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>1625</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504080000</ACCOUNT>
    <DESCRIPTION>Drivers Liscencs</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090000</ACCOUNT>
    <DESCRIPTION>Traveling Expenses</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>2601</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090100</ACCOUNT>
    <DESCRIPTION>Traveling Food</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090200</ACCOUNT>
    <DESCRIPTION>Traveling Car Rent</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090300</ACCOUNT>
    <DESCRIPTION>Traveling Hotel</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090400</ACCOUNT>
    <DESCRIPTION>Traveling Taxi</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504090500</ACCOUNT>
    <DESCRIPTION>Traveling Telephones</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>504100000</ACCOUNT>
    <DESCRIPTION>Gratuity Pay</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505000000</ACCOUNT>
    <DESCRIPTION>Permits and Liscenses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505010000</ACCOUNT>
    <DESCRIPTION>Permits and Liscenses - Iqama Expense</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505020000</ACCOUNT>
    <DESCRIPTION>Permits and Liscenses - Car Registration Renewal</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505030000</ACCOUNT>
    <DESCRIPTION>Permits and Liscenses - MVPI</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505040000</ACCOUNT>
    <DESCRIPTION>Company License</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505045000</ACCOUNT>
    <DESCRIPTION>Permits and License Drivers License</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>505050000</ACCOUNT>
    <DESCRIPTION>Permits and licenses-Others</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>506000000</ACCOUNT>
    <DESCRIPTION>Director's Remunerations</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>507000000</ACCOUNT>
    <DESCRIPTION>Audit Fees</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>10866</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>508000000</ACCOUNT>
    <DESCRIPTION>Legal Fees</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>509000000</ACCOUNT>
    <DESCRIPTION>Professional Fees</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510000000</ACCOUNT>
    <DESCRIPTION>Communication Expenses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510010000</ACCOUNT>
    <DESCRIPTION>Communication Expenses - Telephone</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>748</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510020000</ACCOUNT>
    <DESCRIPTION>Communication Expenses - Telefax</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>51</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510030000</ACCOUNT>
    <DESCRIPTION>Communication Expenses - Postage</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510040000</ACCOUNT>
    <DESCRIPTION>Communication Expenses - Mobile</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>175</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>510050000</ACCOUNT>
    <DESCRIPTION>Communication expense – Satellite Connectivity</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>511000000</ACCOUNT>
    <DESCRIPTION>Stationery</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>511010000</ACCOUNT>
    <DESCRIPTION>Printing and Stationary</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>511011000</ACCOUNT>
    <DESCRIPTION>IT Expense</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>512000000</ACCOUNT>
    <DESCRIPTION>Supplies</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>512010000</ACCOUNT>
    <DESCRIPTION>Operating Supplies</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>3385.796</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>512020000</ACCOUNT>
    <DESCRIPTION>Lubricants Supplies</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513000000</ACCOUNT>
    <DESCRIPTION>Rental Expenses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513010000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Housing</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513020000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Warehouses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513030000</ACCOUNT>
    <DESCRIPTION>Business Promotion - Rental Signage</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513040000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Vending Machines</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513050000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Municipality</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513051000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Signage</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>513060000</ACCOUNT>
    <DESCRIPTION>Rental Expenses - Other</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>0</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>514000000</ACCOUNT>
    <DESCRIPTION>Motor Vehicle Expenses</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>514010000</ACCOUNT>
    <DESCRIPTION>Motor Vehicle Expenses - Repairs and Maintenance</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>883.381</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>514020000</ACCOUNT>
    <DESCRIPTION>Motor Vehicle Expenses - Fuel and Oil</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>50</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>514030000</ACCOUNT>
    <DESCRIPTION>Motor Vehicle Expenses - Rep and Maint - Outside Job Orders</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>150</AMOUNT>
    </G_AMOUNT>
    </LIST_G_AMOUNT>
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>514040000</ACCOUNT>
    <DESCRIPTION>Motor Vehicle Expenses - Others</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>515000000</ACCOUNT>
    <DESCRIPTION>Insurance</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>515010000</ACCOUNT>
    <DESCRIPTION>Insurance - Fire Insurance</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>515020000</ACCOUNT>
    <DESCRIPTION>Insurance - Workmen Compensation</DESCRIPTION>
    <LIST_G_AMOUNT />
    </G_ACCOUNT>
    - <G_ACCOUNT>
    <ACCOUNT>515030000</ACCOUNT>
    <DESCRIPTION>Insurance - Fidility Insurance</DESCRIPTION>
    - <LIST_G_AMOUNT>
    - <G_AMOUNT>
    <AMOUNT>900.61</AMOUNT>
    </G_AMOUNT>
    ---------------------------------------------------------------------------------

    try this, there must be simpler one i guess...
    1. take a form field, and make its type as number. Paste the below one <?xdoxslt:set_variable($_XDOCTX,'v1',2)?>
    2. now take a table with as below,
    A l B |
    C l D1 l D2 l E1 l E2 l
    observe that i. A, C are in one column
    ii. cell B is on top of D1, D2
    iii. we have no cell on top of E1 and E2 cells
    iv. 'l' represents the wall of the cell :)
    A: <?horizontal-break-table:1?> SCHEMECODE
    B: <?for-each-group@column:G_SCHEMECODE;ASSET_TYPE?> <?ASSET_TYPE?> <?end for-each?>
    C: <?for-each-group:G_SCHEMECODE;SCHEMECODE?> <?xdoxslt:set_variable($_XDOCTX,'v1',2)?> <?SCHEMECODE?>
    D1: <?for-each-group@cell:current-group();ASSET_TYPE?> <?MARGIN?> <?xdoxslt:set_variable($_XDOCTX,'v1',xdoxslt:get_variable($_XDOCTX,'v1')-1)?>
    D2: <?AMOUNT_SECURED?> <?end for-each?> <?end for-each?>
    E1: <?for-each@column:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX,'v1'),1)?>
    E2: <?END FOR-EACH?>
    3. If you are confused gimme your email id, i will pass the template. But you should add credits to me.. :)

  • Problem with Cross-tab report (RTF Template) null values, current-group()

    Hi, experts!
    I generate Cross-tab report using RTF Tamlpate and I have problem with grouping.
    My XML file have to be with one group only because I want to using dynamic regrouping inside the RTF template.
    Here is my data structure (XML file):(Look the images for details)
    http://img156.imageshack.us/img156/3997/xmlstructureay9.jpg
    =======================
    WITH GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/2951/resultcrosstabbycustomehf8.jpg
    When I'm using grouping and I want to have for each group cross-tab report I have the following problem: (Look the images for details)
    http://img156.imageshack.us/img156/8786/resultcrosstabbycustomect9.jpg
    And this is my code I'm using inside the RTF template with groups:(Look the images for details)
    http://img156.imageshack.us/img156/4253/fieldbrowserxb7.jpg
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    =======================
    WITHOUT GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/9545/resultcrosstabwithoutgrzg7.jpg
    When I generate one cross-tab there is no problem: (Look the images for details)
    http://img156.imageshack.us/img156/7030/resultcrosstabwithoutgrsr1.jpg
    This is my code I'm using inside the RTF template WITHOUT groups:(Look the images for details)
    http://img151.imageshack.us/img151/7030/fieldbrowserwithoutgrours8.jpg
    Can someone give me a hand to deal with this?
    Thank you!

    Pitson,
    better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
    BI Publisher
    Regards
    Rainer

Maybe you are looking for