Formula for Cross-Tab Column
Hi
I am struggling with a particular issue related to cross-tab and I tried a lot, but couldn't managed to get the solution.
Please help with this issue , it would be of great help to me.
Thanks
Aniket
[CrossTab problem|http://www.forumtopics.com/busobj/viewtopic.php?t=120765]
Thanks for your prompt reply.
As I am new to this forum,so I don't know how to attach file, also I tried searching but couldn't get.
At the end of the previous post, Link is given. There is a file attached "Plz_help.zip". Please look into that file and also if you know how to attach any file, please let me know.
If still it's not clear, please let me know I will try my best to clear this issue.
[http://www.forumtopics.com/busobj/viewtopic.php?t=120765]
Thanks a lot.
Regards
Aniket
Similar Messages
-
Post Author: bvandyck
CA Forum: Formula
The results of a row in a cross tab report need to be split out by percentages and added to the results of other rows. Each row is an individual, except one row is a combination of individuals. Certain individuals share in the results of the combination row. The combination row will be zero after being added to the individuals' rows. What is the formula for achieving this?Hi,
U may create a new formula for that.
There is an option in cross tab expert for new formula.
U may create a formula of your choice and then insert in report.
Regards,
Misra P. -
Can somebody give me the formula for the balance column in a check register please? I am setting the register up like the sample in iWork 09 but I seem to be missing something in the formula.
OM,
The way the checking account balance column works is to designate one cell for the starting balance, indicate income with positive figures and outgo with negative figures, summing the transactions and adding the sum to the starting figure.
The formula used, =$F$1+SUM(OFFSET(F3,3-ROW(),-1,ROW()-2)), is not too difficult to understand if you study the syntax for Offset. The author of this template didn't do us any favors because the expression could have been written more clearly, in my opinion. I'll explain how it's done in the template, and then how I would have written it. With the two approaches you may be able to see what it's all about.
$F$1 is the starting balance.
SUM requires a Range specification.
Offset provides the range specification. The syntax for Offset is as follows:
Base Cell. In this case it is F3, the cell the expression is written in.
Row Offset. In this case the author takes the current row number and subtracts the starting row from it. For the first balance the offset will be zero since the first balance is in row 3. For all the subsequent balances, the offset will be negative, meaning that the offset will point to a row above the current row.
Column Offset. In this case the column offset is 0. That means that it is pointing 1 column to the left, Column E.
Rows. This parameter sets the length of the range, in rows. Subtracting 2 from the current row number means that the range will be 1 for the first balance and will grow by 1 for each entry down the list.
Taking all this into account, the range for the Sum function will always be Column E from Row 2 to the current Row.
How I would have written the balance expression:
=F$1+SUM(OFFSET(E$3,0,0,ROW()-2))
I believe it's easier to follow.
The starting balance is still in F1, but only the row needs to be absolute - a fine point, I know.
In my expression the base cell for the Offset function is the first entry cell of the transactions, E3. The row needs to be absolute, there is no reason for the base cell to move about as it does in the author's version.
In my approach, both the row and column offsets are zero. We always start at E3.
In my approach, the number of rows in the range is the current row number minus 2, just as in the author's expression. That means we include all rows from Row 3 to the current row.
I'd be happy to answer any other questions about the specifics, but you need to be specific about what you don't get.
Jerry -
Custom formula in cross-tab?
I have a cross-tab like this
JAN FEB MAR ....... DEC (the 12 months as columns)
year 2006
item 01 150 205 300 ....... 550
item 02 80 190 284 ........ 620
year 2007
item 01 458 235 224 .......... 781
item 02 154 254 134.......... 254
year 2008
item 01 245 154 544 1243
item 02 524 254 124 ......... 924
I want to know if is possible to have a formula that take the value of each month and compare with the previous and make a calcule like this...
JAN FEB MAR ....... DEC (the 12 months as columns)
year 2006
item 01 150 205 300 ....... 550
item 02 80 190 284 ........ 620
year 2007
item 01 458 235 224 .......... 781
(205) (14)
item 02 154 254 134.......... 254
year 2008
item 01 245 154 544 1243
item 02 524 254 124 ......... 924
where (205) and (14) are calculate from:
(205) = (150 - 458) * 100 / 150 I have to make this operation for each month takin the values from item 01 from 2006 with the values from item 01 from 2007 and so on
Edited by: j jara on Jul 22, 2008 2:01 AMYes it is possible.
It would be easier in CR2008 where you have the ability to add Calculated Members.
In previous versions you would need to create a variable for each year and using the GridRowColumnValue function assign the current value to a variable. You would then need to add a second summary field as a "dummy" summary and in the Display string formula declare the variables and manipulate the values as you like and finally convert the output to string. -
SAP Crystal Report - Formula in Cross Tab Report
I have a below requirement in a cross tab report,
Category Name Valu1 Value2 %ge
A Car 40 50 80
A Bike 30 60 50
Total 70 110 63.6
%ge is a formula field and is calculated as value1/value2 * 100
Consider the Total section as a group footer.
In the cross tab report how do I put the formula field for %ge in Total section.Vishujain
Crosstabs are very structured and you are limited in what you can do with them. You can do a percentage summary in Crosstabs, but only as a percentage of the row total or the percentage of the column total. You cannot put a formula in the crosstab to do a percentage of a values in seperate rows. Any time I need to perform a function not available in a crosstab, I do a manual cross tab. Look at: [Manual Crosstab Explaination|Re: Formulas : Help for coding]
Debi
Edited by: Debi Herbert on Nov 3, 2011 11:51 AM -
Help with formatting for Cross Tab Report Crystal 2008
This is probably a simple question. I have a cross tab report that displays sales by month for a period of 6 months. These sales columns are formatted to be numbers with no decimals. In addition to these columns, I have inserted columns that display the percentage up/down in sales over the previous month. If I try to format the percentage columns, it changes every column to then display "##,##.##%" when I need to keep the sales columns at "##,###" with no decimal or percentage sign.
1. Is there a way to change the formatting of some of the columns but not all in a cross tab report?
2. If not, can I add a function that would change these in the calculation formula of the calculated member?
I tried to add "%" but it wants it to return a number.
Here is the current code:
//The calculation formula is used in place of the summaries in Calculated Members.
// This calculation formula must return a/an Number value.
If GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex) = 0 then 0 else
((GridValueAt (CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex) -
GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) /
GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) * 100
Any help is appreciated.
Thank you,
TobiCarl,
Thank you for your help. I did try your method but still couldn't get it to ignore the fact that it wanted a number. I changed my approach a litte and managed to solve the problem. Here is the method that I chose which managed to solve the problem. If this is a poor way to solve it, please let me know as I am always open for new ways.
Format Field > Number Tab > Customize > Currency Symbol Tab
Checked Enable Currency Symbol Fixed, changed currency symbol to %. This is the same thing that I did before which changes it for all columns.
Beside Enable Currency checkbox, I added this formula:
// This conditional formatting formula must return one of the following Currency Symbol Constants:
// crNoCurrencySymbol
// crFixedCurrencySymbol
// crFloatingCurrencySymbol
If GridRowColumnValue("InvoiceLine.TxnDate") = Date(0,0,0) then
crFixedCurrencySymbol
else
crNoCurrencySymbol
My added columns have a null date field so they take the currency format. My other columns do not so they do not take the formatting.
Thanks again for the help.
Tobi
Edited by: Tobi@TABeverage on Dec 2, 2009 3:58 PM -
I'm trying to design a cross-tab report the following columns:
Rows : MONTHS Columns : 2009 Sales; 2010 Sales; 2011 Projections; 2011 Sales; Sales vs Proj; % diff; 2010 vs 2011 diff
I have a grouping on location. Then I created a formula that will define what goes in each column. The Sales columns are in the database. The projections will be hard coded (an amount for each month and each location).
MY PROBLEM IS, I'M HAVING A HARD TIME GETTING THE PROJECTIONS TO GO INTO THE CORRECT COLUMN.
Here is a formula I have for each location. ( I was having trouble getting all the locations in one formula)
IF {@SERVICE TYPE NAMES}="DALLAS" THEN (IF{@MONTH NUMBER}= "01 - JANUARY" THEN 989006.66
ELSE
IF{@MONTH NUMBER}= "02 - FEBRUARY" THEN 1006933.40
ELSE
IF{@MONTH NUMBER}= "03 - MARCH" THEN 2027802.10
ELSE
IF{@MONTH NUMBER}= "04 - APRIL" THEN 2229853.06
ELSE
IF{@MONTH NUMBER}= "05 - MAY" THEN 2286594.60
ELSE
IF{@MONTH NUMBER}= "06 - JUNE" THEN 2273131.89
ELSE
IF{@MONTH NUMBER}= "07 - JULY" THEN 2192997.93
ELSE
IF{@MONTH NUMBER}= "08 - AUGUST" THEN 2083988.42
ELSE
IF{@MONTH NUMBER}= "09 - SEPTEMBER" THEN 1851888.57
ELSE
IF{@MONTH NUMBER}= "10 - OCTOBER" THEN 1720331.72
ELSE
IF{@MONTH NUMBER}= "11 - NOVEMBER" THEN 1158791.62
ELSE
IF{@MONTH NUMBER}= "12 - DECEMBER" THEN 1089271.37
ELSE 0)Hi,
Nested Ifs are like brackets. If you mess one up all the others that follow will do strange things and trying to figure it out just causes high-blood pressure.
Try this with Case statements instead:
IF {@SERVICE TYPE NAMES}="DALLAS" THEN
(Select {@MONTH NUMBER}
Case "01 - JANUARY" :989006.66
Case "02 - FEBRUARY" :1006933.40
Case "03 - MARCH" :2027802.10
Case "04 - APRIL" :2229853.06
Case "05 - MAY" :2286594.60
Case "06 - JUNE" :2273131.89
Case "07 - JULY" :2192997.93
Case "08 - AUGUST" :2083988.42
Case "09 - SEPTEMBER" :1851888.57
Case "10 - OCTOBER" :1720331.72
Case "11 - NOVEMBER" :1158791.62
Case "12 - DECEMBER" :1089271.37
Default :0;)
ELSE 0;
I added a Default because I prefer to control unknowns than having Crystal do it and erring out unexpectedly.
Good luck,
Brian -
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.. :) -
Diffrent Data Type & Formula in Cross Tab
Post Author: ade
CA Forum: General
I using crystal reports 8.5. I make cross tab like this to viewing reportsSubject Evaluation Aspect Score1 Score2 Score3 Score4 Score5 Math Conceptual Understanding 80 75 70 80 A Problem Solving 77 80 90 67 BEnglish Reading 89 80 86 80 A Wring 80 80 70 85 Bfrom the table above, there are 2 types of different data they are numeric and string.In the using of logical "if" in cross tab is not allowed to use different data type and I don't understand on it... would you please help me, what shoul I do then?Yes it is possible.
It would be easier in CR2008 where you have the ability to add Calculated Members.
In previous versions you would need to create a variable for each year and using the GridRowColumnValue function assign the current value to a variable. You would then need to add a second summary field as a "dummy" summary and in the Display string formula declare the variables and manipulate the values as you like and finally convert the output to string. -
Formula/manual cross tab help
my variable name in my database is rsq01. the results for this variable are 0,1,2,3,4,5.
I need to setup a crosstab that only shows the results 1-5 and what percent of the total results they are, 0 needs to be excluded
from the crosstab and from the count that is used in figuring the percentage because 0 is actually null.
I have been told to do this I will have to make a manual cross tab using formulas.
Any suggestions/examples on how to do this? Thanks.Pretty simple actually. Just create 5 formulas...
//Formula 1
Global NumberVar rsq01;
IF rsq01= 1 THEN {TableName.FieldName} ELSE 0
//Formula 2
Global NumberVar rsq01;
IF rsq01 = 2 THEN {TableName.FieldName} ELSE 0
//Formula 3
Global NumberVar rsq01;
IF rsq01= 3 THEN {TableName.FieldName} ELSE 0
//Formula 4
Global NumberVar rsq01;
IF rsq01= 4 THEN {TableName.FieldName} ELSE 0
//Formula 5
Global NumberVar rsq01;
IF rsq01= 5 THEN {TableName.FieldName} ELSE 0
Then group by the appropriate field, sum each of the formulas and hide the details.
HTH,
Jason -
Cross Tab Column Header and Embedded or Calculated Member
Hello All
I am needing some help with a Cross Tab in CR2008.
My Cross Tab look as follows:
Rows______________Columns
......................................Fiscal Year
Account Number...........Summarized Field (Value Field)
The report spans three Fiscal Years but not all accounts have three Fiscal Years worth of data so some Cross tabs start 2009, 2008, 2007, Some report 2008 and 2007, Some just 2007 (and other variations). To get my cross tab working correctly I need to create a formula that get the CurrentColumnIndex based upon the Fiscal Year. e.g. If columnd header = 2009 column index = 0.
Can anyone advise how I would go about this?
Thanks
PhillipPhillip, go to your data source, and see if you can add a new connection,
one of those options should be (Command)
if you can add a Command, then you can put the SQL in the command section.
You will need to add the Command as a data source, and remove the old
data source once the command is added, you will be able to edit it if needed. -
Hi
I created a cross-tab report in Bi Publisher, the sorting in the column names is sorted in alphabetical order. How do I customize this in the order I expected?
Thank you in advance,
JeanThank you Jorge!
I used the pivot table to create the template in word. I check the link and it is what I need. But the template I created is so different. I am very new to BI Publisher. the following is the what I have in the field browser:
crosstab:c547;"//ROW";"ETHNIC{,o=a,t=t}";"S_TYPE{,o=a,t=t}";"EMP_ID";"count"?>
<?horizontal-break-table:1?>
<?for-each@column:$c547//C1?>
<?./H?>
<?end for-each?>
<?for-each:$c547//R1?>
<?./H?>
<?for-each@cell:.//R1C1?>
<?./M1?>
<?end for-each?>
<?./T1?>
<?end for-each?>
<?for-each@cell:$c547//C1?>
<?./T1?>
<?end for-each?>
<?$c547//M0/M1/T?>
How do I make the S_TYPE in my order, like the sample you gave me (Wednesday before Thursday)?
Thanks,
Jean -
I have a cross tab report that has three column fields. I want to design the report such that when the outer most column (1st column) field get repeated again it should appear at a certain gap from the first one.
By default crystal report shows all the columns joined together with no space in between.
e.g lets say that column has three values A,B and C. I want to have the cross tab report to have gaps between these three matrices that get displayed. i.e. A with its sub columns and summary values then a slight gap followed by B with its sub columns and summary values and so on.
Please Help.Is the show cell margins option checked or not.If unchecked please check it and see the results.
If this doesnot work you can right click on the summary field and in the Display String add formula
" "+CStr(CurrentFieldValue)+" "
Hope this helps
Regards
sjain
Edited by: sjain on Nov 6, 2009 6:04 AM -
Cross tab column headers display on all pages
I made a Crystal Report with a cross tab which displays all details. In the cross tab I have 6 columns with details about the data displayed in the last 2 columns. The headers of these columns are only displayed on the first page but not on other pages. How can I add column headers to all pages? Thank you.
Column headings should be repeated automatically, row headings can be repeated by
1.right-clicking on the row header
2. select Row options
3. .select Repeat Labels on Page break
or, when I just reviewed it in the help section it says:
"When you create a Cross-Tab that is wider or longer than the specified page size, the program automatically spans the printing across enough pages to accommodate the size of the Cross-Tab. In the Preview tab, a line will appear at each page break. For ease in reading, column headings will be repeated on subsequent pages. Row headings can also be repeated using the Keep Columns Together option.
To repeat row labels
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Select the Repeat Row Labels check box, if desired.
Crystal Reports lets you designate report objects that don't expand horizontally, such as text objects, field objects, OLE objects, charts, maps, lines, boxes, and so on, to be repeated on each additional horizontal page that a Cross-Tab creates. For more information, see Repeating report objects on horizontal pages." -
Customized Sort for Cross-Tab Row
I have a simple Cross-Tab on my report that needs to be sorted in a static Row order.
My cross tab has 1 Row (Name) and 1 column (Total Sales).
Currently the CrossTab sorts the Name Alphabetically (ASC). But I need to specify a specific order. I have added a numeric field to my table and I assign a numeric value to the last names so that I might be able to sort the Name Row based on my "CustomSortOrder" numeric field.
Currently it looks something like this:
A
B
C
D
E
I want it to be: (numeric value behind the scenes)
C (1)
D (2)
E (3)
A (4)
B (5)
ALL OTHERS (9999)
I cant seem to figure out where I need to set this. I have tried adding a group to the report. I have tried setting the Report Sort order. I am out of ideas.
Any help would be greatly appreciated.Hi Jimmy,
Here's what you need to do :
1) Go to the Crosstab Expert > Remove the existing 'name' field from the 'Row'
3) Add the numeric field as the 'Row'
4) Select the Row > Group Options > Options Tab > Customize Group Name Field > Use formula as a Group Name > Click the formula button beside and use this code:
If {numeric_field} = 9999 then "All Others"
else
{Name_Field}
-Abhilash
Maybe you are looking for
-
i downloaded an upgrade from itunes last night to os5.1 i think. it said there was a problem with the download. now my phone will not work at all. it just has a picture of the itunes logo ans a picture of a usb cable on it. my computer will not recog
-
I am unable to get my audio and video to work on ichat. i always get an error message. this is the error details. any thoughts? tia!!! Date/Time: 2009-05-11 20:17:53.523 -0500 OS Version: 10.4.11 (Build 8S2167) Report Version: 4 iChat Connection Log:
-
Need some help with this code.
var myDoc = app.documents[0] var mySel = app.selection[0] var myStory = mySel.parentStory; // Now we are pointing to the entire story var myHolidayStyle1 = "Holiday-Header" // Header 'day of the week' var myHolidayStyle2 = "Holiday-Sub-Heading-Date"
-
Abap/heap_area_total
Hi, While running a job it fails with the below error ====================================================================== A Tue Mar 11 10:01:15 2008 A WP has reached a
-
Hi all , I declared function module import and export parameters type of XSTRING . Here is my code SELECT SINGLE * FROM marc INTO t_marc WHERE matnr = material. materila declared as XSTRING . material existed in marc table but always after this stat