Cross tab report: handle null elements
hi
i have a cross tab report if there are null elements in the column(vertical group) the excel sheet format is not right. also if the some horizontal column elements have 1 column and some other have max 24 columns. how to handle this. please help
COL1 COL2 ...........COL24 ARE dynamic. For row 100 there 24 rows and for row 200 there will be one row. when i group by col it is also gouping the null colum into a separate column so i get extra col25 which is basically null
h1 h2 h3 h4 col1 col2 col3 col4 col4 ..............col24
100 1 2 3 10 20 30 40 50 ...............240
200 1 2 3 ...............
300 1 2 3 ...............
400 1 2 3 10 20 30 40 50 ...............240
500 1 2 3 10 20 30 40 50 ...............240
600 1 2 3 ............... pleas help.Thanks
send me the template and xml data to [email protected]
Similar Messages
-
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 -
Cross tab report-dyanamic columns for months and quarterly sum
Hi all,
I work on report creation in BI Publisher.I need to display values in a cross tab report in a way that it shows data for 3 months and then a column for its quarterly sum.
For ex:-
Market --Jan Feb Mar Q1_sum Apr May Jun Q2_sum ---------------like wise for n months
Market1 100 --80 --30 -- 210 --10 -- 80 --90 --210
Market2 120 --90 --40 --250 --100 --70 --30 --200
Market3 130 --70 --60 --260 --140 -- 0 --40 --180 ('--' just to maintain indentation)
The values of number of months( date range) and the names of market are derived dyanamically .
The code from my sql query presently shows months-range (Jan ,feb,mar..), Quarterly sum to be displayed, Market names etc as child elements in multiple occurences main Query set.
<Main Query>
<Market>abc</Market>
<Region>abc</Region>
<Months-Range>abc</Months-Range>
<Quarterly_sum>abc</Quarterly_sum>
<Main Query>
<Main Query>
</Main Query>
Please guide me on code in rtf template for the same.
Thanks
Edited by: user9061488 on Jul 13, 2010 1:32 AM
Edited by: user9061488 on Jul 13, 2010 3:48 AMHi,
Do u have time dim in your metadata??
If not,
Create a time dimension year,quater,month,day
http://lh4.ggpht.com/_rhCtHYLiamQ/S7PQvxYBbzI/AAAAAAABZXI/ef_Ur9AmyUo/s800/04_year_quarter_bmm.jpg
After that in fact table by using the (ago/todate) function ....pull the respective columns to pivot table columns section(date column) and measures col in measures section and enable the grand total in columns section so that it will show grand total for every quarter
thanks,
saichand.v -
Cross Tab report in details section
Hi All
I am new to Crystal Reports and have a few queries related to a cross tab report. I am trying to design a report as follows
Rows: Cost elements
Columns: 12 months,YTD and Total Year for Actuals & then 12 months,YTD and Total Year for Budgets
Gruop By: Cost Centre
For Example;
Actual Budgets
Apr May June July.....YTD FY2010 Apr May June July.....YTD FY2010
Manpower Cost
Rent
Total Cost
1. Since I need the above table for every individual cost centre, is it possible to group by Cost centre and then build a cross tab report in the details section?
2. If not, is there any other way by which I can create the above table without using cross tab?
3. For the YTD values, should it be calculated in the BW query (I am using BW queries as the datasource) or in Crystal Reports? and how?
Thank you very much. I would appreciate your early response.
PayalHi
Thanks for your inputs. Currently I have designed my report in the same way (group by cost centre & cross tab in group header section). However, I am still looking for a way to calculate YTD & Quarter values in Crystal using a formula. I am debating whether it should be calculated in BW or in Crystal.
Thanks
Payal -
Suppress values in Cross-Tab and Cross-Tab Chart if null
I am developing a cross-tab report that has no-values contributing to the summary in a number of cells. For instance, if I were to display the average value for the testing of particle-counts by the day of the month, and no testing was performed on a particular day, then I would hope that the cell would be blank and a plot of the cross-tab would just omit that data point. However, Crystal interprets this as a 0.00 instead of NULL, and the plot (incorrectly) includes the zero-datapoint.
I can suppress the datapoint in the cross-tab if it's zero, but that isn't correct either (as, sometimes, zero will be the correct answer). Even then, though, I cannot suppress the datapoint on the plot.
Anyone have experience with a workaround for this?
Thanks - TimBTW...I found that I can work-around the plotting issue if I convert the chart to a "Group" type (instead of cross-tab). It will then ignore the null-values. Still thinking about cross-tab displaying zero for a summary value when it is working with no data.
Suggestions? -
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 have created a report in Crystal and on top of the report there's a cross tab report. Why isn't all the info from the report pulling into the cross tab report?
Voraresh,
There could be many reasons. Do you have any parameters that are limiting you data? Is the Crosstab in the
page header or footer, or in a group?
If you create a plain report, "no crosstab" put a field in the details and run, how many records do you get?
Now go back to the Crosstab and run, how many records do you get?
If the numbers are different, my assumption is you have a filter, or a parameter that is not allowing the data to show,
or your Crosstab is based on a field that is occasionaly a null. -
Does Xcelsius support Cross Tab report via Live Office?
-Operating System: Windows XP
-OS Patch level: Service Pack 3
-Office Version: 2007
-Flash Player version: 10
-Xcelsius Version and Patch Level: Enterprise 2008 with SP2 (version: 5.2.0.0)
-Xcelsius Build number (Help>About Xcelsius): 12,2,0,608
-Business Objects Enterprise version/patch level (if applicable): Edge 3.1
-Issue Description:
I have a dashboard which collects data via Live Office from a series of Webi documents and Crystal Reports. I have found that if I create a report that has for instance sales regions down the left and months across the top using a cross tab in either Crystal Reports or as a Webi the data will only refresh within the current month, so for instance if I create the report in October the sales figure for October will update happily until the last day of the month but on the first of November no sales figures will show in the new month and I have to manually refresh the report in Xcelsius and issue a new Dashboard to my users. This makes me wonder whether Cross Tab reports are actually supported via Live Office. If I use formulas in Crystal Reports and manually build a report that looks like this but uses formulas it works fine, but is obviously a much slower process than simply building a Webi cross tab.
Your views and help would be very much appreciated!!
Thanks
Rob
-Steps to Duplicate:
As AboveHi Rob,
You can bind cross tab reports from your WebI reports into Xcelsius using an integration tool called[ Xcelsius Web Intelligence Intregration Suite|http://www.antivia.com/products-xcelsius.stm].
This will give you the full functionality of Web Intelligence inside an Xcelsius dashboard- drill-down, cross tabs, even an ad hoc query panel, all bound into the Xcelsius interface.
This would remove the need to use QaaWs or Live Office, so you can probably realize some performance gains and handle larger data volumes.
Cheers,
Andrew -
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. -
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 AMok 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
Maybe you are looking for
-
Please Acknowledge - Pop up message
Hi all, Every time I opens a form its giving me a message "Please Acknowledge" .that form uses the webutil to open MS Word Document.Please tell me how to block that message. Thanks in advance
-
Iphoto and Kodak Gallery Plug in or Ofoto Express
I have read multiple iphoto threads about using other upload programs and I use Kodak Gallery. Does anyone know what the difference is between using either the Kodak Gallery Iphoto Plug in or using the Ofoto Express software from Kodak? Is one prefer
-
Modifying Webdynpro log on file
Hi, I want to modify the Webdynpro based log on file, not the logon.par. How will I get the webdynpro project in my local NWDS. Please guide. I have already located the application but unable to get the Webdynpro project in NWDS. The application is
-
Hi Guys, I just wanna share and say that I'm totally dissapointed with this new product, its not common for gadget that we called smartphone. My Z10, after about a month usage, it started to get trouble and error every where which are : - The screen
-
DTW unable to import new accouts with ship to state
Is there a way to import ship to state in the DTW when making new accounts?