Calculating percentages by date grouping in a Cross-tab report.
I have created a monthly at glance dashboard, and I am having difficulty with the percentage breakdown. I have the report grouped by date, and sorted by month with YTD total on the right.
*The problem is all the rows with a percentage are calculating the same across the columns. The YTD total is correct, but the totals for January and February are not 60%.
If I run the report for one month everything aligns, and in multiple months everything is correct with count summaries.
Please let me know if anyone has any advice.
Please see the crosstab expert window view requested below.
Also, here is another screenshot of the crosstab in preview. You will see that all sums with whole numbers are calculating and pulling correctly by month. The sums with percentages are defaulting to the YTD across the row. Thank you very much for your assistance.
Joshua
Similar Messages
-
Discover group problem with cross tab report
Hi, I'm working on a cross tab report in discoverer 4i and I'm having a problem with two of the colums. I'm doing a count on one field but because they are called something different they are being shown as two seperate columns rather than 1.
I have one called 101 -AVG and another called 101-AVG. My condition pulls every result back that starts with 101 in the table. So because in the table the values are different it breaks the count into totals for 101 -AVG and 101-AVG.
Is there some way I can group these results together into one field?
thanks,
IanPitson,
better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
BI Publisher
Regards
Rainer -
Can I next two specified order groups in a Cross Tab report?
Hi. I've created sets of specified order account number for a financial statement report, Income and Admn Expenses, Contract Expenses, etc. But I'd like to create other subsets of accounts, say for all the payroll taxes expeneses, and under the original specified order for Salaries & Benefits Expense, add various account numbers and the subset Payroll Ttaxes.
Is this possible?
Thanks!
RobinHi Robin,
I think you could achieve that using subreports; in each subreport, you would work on a specific set of data.
In the main report, you would just display the required data from each subrport.
I hope this helps,
Selenia -
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 -
Drill down on cross tab report
I would like to know whether it is possible to drill down through groups in a cross tab report.
go to your online help in crystal reports and in the index section, look up "report part navigation".
read through the sections on report parts and go through each section (using the right arrow at the bottom left of the help page) until you hit the section that is titled "context Report Part option scenarios". -
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.. :) -
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 -
SORTING FOR THE CALCULATION FIELD IN CROSS TAB REPORT
LIST_G_AUCTION_TITLE>
<G_AUCTION_TITLE>
<BID_NUMBER>5002</BID_NUMBER>
<AUCTION_TITLE>E2E-01 Construction RFQ</AUCTION_TITLE>
<ITEM_NUMBER>C2631</ITEM_NUMBER>
<ITEM_DESCRIPTION>4G000,000,0STRUC,X,SPECIAL STRUCTURE</ITEM_DESCRIPTION>
<ESTIMATED_QTY>1</ESTIMATED_QTY>
<UNIT>LS</UNIT>
<QUOTE_PRICE>400</QUOTE_PRICE>
<ESTIMATED_QUOTE_PRICE>400</ESTIMATED_QUOTE_PRICE>
<SUPPLIER>X - L CONTRACTING</SUPPLIER>
my xml data is in this format, i created a cross tab report for ITEM_DESCRIPTION as row and SUPPLIER as column and calculated a sum(ESTIMATED_QUOTE_PRICE)
for all the ITEM_DESCRIPTION for every SUPPLIER in templete . now i need to sort the data by sum(ESTIMATED_QUOTE_PRICE) from lowest to higest from left to right , that is supplier with lowest sum(ESTIMATED_QUOTE_PRICE) should display first from left to right.
can any one help thanks in advance.thank you tim , for asking i got the solution. it is actually in template builder i was asking about. xml template builder
-
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,
EswariHi,
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. -
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/14Ido,
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 AMYou 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 -
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 PMDear 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. -
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 -
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.
Maybe you are looking for
-
Issue while creating a enhancement window with Interface enabled check
Hello everyone, i have a standard webdynpro component "fmca_wdy_return" to enhance. The component is one the applications configured in floor plan manager "FPM_OIF_COMPONENT". we have created a tab on the FPM view and we need to configure the wda com
-
Is there any possiblity to not to take the print out before release of PO
Is there any possiblity to not to take the print out before release of PO. Please give some inputs to set up this in system.
-
Where can I get an OS-X 10.4 full install (black) DVD?
I've recently been given an old G4 17" iMac with 10.2.8 on it. I would like to upgrade this but only to 10.4 since I need a machine which runs "Classic". Our original Mini cam with 10.4 but I cannot find the install DVD Looking at eBay they seem to b
-
Trying to migrate from MBPro Leopard to MBPro Lion
..Migration Assistant is a Liability can't even find the other computer, I'm already dragging the files from (target mode). So doing it manually. Problem: There is no Library folder in Users/home/ on the destination (Lion) computer.. There is alread
-
Cisco pix 525 and 515 cannot archieve configuration in LMS 3.0.1
Hi, we have several cisco pix 525 and 515 cannot archieve configuration in LMS 3.0.1 Any help would be greatly appriciated. Thanks in advance Samir