Hide Column in Cross Tab
Hi,
depending on my previous thread (RTF Cross Table like Analyzer I tried now to hide one if the columns, when the total of is is 0.
I used the <if@cell:sum (current-group()/SUM_X.MYVALUE)>0?> ...
and <if@column:sum (current-group()/SUM_X.MYVALUE)>0?> to hide the column and header. The Header cell is no more shown, but for the values it doesn't work. It only hides the values but not the entire column.
any suggestions what to do?
Thanks
chrissy
Hi ,
May be this will help u out ... pls go through that.
XML Publisher allows you to specify formatting conditions as the row-level of a
table. Examples of row-level formatting are:
• Highlighting a row when the data meets a certain threshold.
• Alternating background colors of rows to ease readability of reports.
• Showing only rows that meet a specific condition.
Conditionally Displaying a Row
To display only rows that meet a certain condition, insert the <?if:condition?> <?end if?>
tags at the beginning and end of the row, within the for-each tags for the group.
Default Text Entry Form Field Help Text Description
for-each SALE <?for-each:SALE?> Opens the for-each loop to repeat the
data belonging to the SALE group.
if big <?if:SALES>5000?> If statement to display the row only
if the element SALES has a value
greater than 5000.
INDUSTRY <?INDUSTRY?> Data field
YEAR <?YEAR?> Data field
MONTH <?MONTH?> Data field
SALES end if <?end if?> Closes the if statement.
end SALE <?end for-each?>
ratnesh
Similar Messages
-
Hide Column in Cross Tab Report
Hi guys,
I have an issue with the Cross Tab in CR2008.
I'm using 2 columns to calculate an other column, but these 2 columns should not be displayed in the report.
I tried to suppress the column but it still shows a white space.
I tried to change the column width, but it cant get it smaller then 0,113.
Can anyone tell me how to set the column width smaller using a formula or how to suppress the whole column.
Thanks in advance.
WilliamHi William,
Instead of using all 3 columns in the crosstab, just drop your main columnn on.
In the Design window, not the Crosstab Experrt, right-click the summary field and select Format Field.
In the Common Tab, open the formula for Display String.
Now you can take the value of your summary using the CurrentFieldValue and make your total. You may need to summarize the supporting numbers to calculate properly but it should work here properly.
I've used this for things like running totals and repeating values between rows.
NOTE: This formula only returns a string so make sure you format your final value as a string.
Good luck,
Brian -
Limiting Columns in Cross Tab reports
Plz tell me how to limit columns in Cross Tab.I have many columns which go on and even are not visible for Scroll and neither in another page
Plz help.Check if http://winrichman.blogspot.com/2009/05/cross-tab-by-limiting-number-of-colums.html is helpful
-
Hi Expert!
I am young of Crystal Report. I have some problems with using cross tab report.
Rows: hour/Floor, Columns: Floor, Summarized Field: Sales
I want to show the result as below:
hour/Floor_____________ Floor1___________Floor2__________Total________Ratio
7h-10h _____________ $500 ___________ $1000 __________$ 1500______75%
10h-13h_______________$200 ___________$300___________$500________ 25%
Total__________________$700___________$1300__________ $2000________100%
I want to add Ratio to show on the right after Total Column.
Can I do like this or not? Or Is there another way to do that with the same result?
Regards,This post looks remarkedly like [Add Column to Cross-tab in Crystal Report|Add Column to Cross-tab in Crystal Report;
Please see it for my replies.
Debi -
SAP Web Intelligence -Comparing subsequent columns in cross tab
Hello,
I am new in SAP web intelligence , I need formula (Not a SQL Query) to find difference of values between subsequent columns in cross tab. Please find attached excel for more details
Thanks & RegardsTry something like in below screenshot-
Craete variable
Diff Amount2=Previous([Amount2])-[Amount2]
~Anuj -
Hi all,
Could any one provide me a solution to hide a cross tab column.
My cross tab has the Dimension in the rows and date values in the columns
Dec'06 Dec'07 Jan'08 Feb'08..........Dec 08
DIM1 20 10 35 28 26
DIM1 30 20 15 14 22
Some reason am bringing Dec'06 data and this data is coming from the universe.
So now I would like to hide this Dec'06 column in the cross tab how can I achieve this?
or is there any solution to hide first column in the cross tab?
Any help would be highly appreciated.
ThanksHi all,
For this I just created a variables as below first for Prior Prior year end as I always need to hide prior prior year Dec data so created a variable as below
Prior prior year end=ToDate("31/12/"+FormatNumber(Year([Date]);"0000");"dd/MM/yyyy")
after that created another variable like
If([date]=[Prior prior year end];"Y";"N")
Now created a filter saying filter cal date="N"
It is hiding all the years december data but I only want to filter only prior prior year end
any help pls
Edited by: VP S on Feb 10, 2011 5:21 PM -
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) -
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 -
Creating a header for rows/columns in cross-tab with syntax
Hi,
The issue is creating strings for rows or columns' headers. How can I create a formula field which contains more than one seperate string. Such as "aaa", "bbb" and "ccc" are headers and they should be in seperate columns. In short, they will behave like characteristics of one of my query's field but they are just headers of the columns.
..............aaa...bbb...ccc....
row1.......x.......x........x.....
row2.......y.......y........y.....
Also there is another issue about the formulation again. Is there any operator that does the same job as " \n" which is used in C languages to break the line?
before:
aaabbb
after:
aaa
bbbHi Carl;
Firstly, thanks for answering my question. To explain my problem there are two options ahead(for my first question); first one is writing down the actions step by step, the second one is posting an image file(jpeg etc) to visualize it. I think the first one will be enough. If not tell me
Step 1- Create a cross-tab and right click and select cross-tab expert.
Step 2- Click the button "New Formula" and write down any word(such as "Sales") between two -"- sign to make it string.Then save and close.
Step 3- Drag and drop the created formula to "columns" section and fill the other necessary sections with your database's(such as xtreme.mdb which is famous for crystal users) fields.Don't forget to add another column value to "columns" section, since our formula has no link to database.
Step 4- Then click OK to save the changes and lets preview the cross-tab.The result will have one top column and his child or children(that depends on your data). And this top column is behaving like a header not a field.
Now turn the second step but write down a formula for 2 columns or more.For exmple "Sales" and "Profit".So the result will have 2 top columns and their child/children.
My question is "what is the formula for 2 or more columns?"
Also I couldn't get the answer for my second question. What is the meaning of expressions "\c" and ChrW(13)?
Edited by: diabolus on Oct 30, 2009 9:39 AM -
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. -
Hello All,
Can anyone suggest me how can i create a cross tab report that has multiple fields in columns and multiple fields in summary?
I have 10 formulae for the columns and 10 for the summary. But if I add more than one in columns or it gives some extended report which i want to avaoid. How can i get a normal cross tab report.
Thanks
RobinnPlease re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551 -
Additional columns in Cross tab
If I have Project name as the column and project count as the summary in a cross tab
for eg
ProjectA,ProjectB, ProjectC
3, 4, 5
CaN i add additional columns next to project C having some condition related to these projects and project counts and then get the grand total??
ThanksLet's see... This is about the tenth time I've answered this question in the past few weeks, but, hay, let's do it again!
The only way I am aware of adding columns to a crosstab is by including new data in your database query. So, if you currently are returning the data
Project Count
ProjectA 2
ProjectB 4
ProjectC 5
Than, probably using a database command for the data source, change it to return
Project Count
ProjectA 2
ProjectB 4
ProjectC 5
Totals 11
How this is accomplished very much depends on your database tables and what additional columns you want to add to the crosstab.
HTH,
Carl -
Post Author: plm
CA Forum: Crystal Reports
Hi,
I have created a cross-tab table that is supposed to return one column per value from a specific field. This specific field is not fixed and currently contains about 50 values (let's make them Col_1, Col_2,...,Col_50. Tomorrow, a user can create Col_51, calling it whatever he wants, and another user delete Col_3. In short, this is fairly dynamic, and the cross-tab is supposed to reflect these values and the data attached to it.
At the moment, Crsytal report XI returns has many columns as there are occurences in my column field. GREAT. How can I get 5 columns over 10 pages instead???
Thanks,
PhilippeSorry, don't think you can. At least I have not been able to figure it out. If you have less rows than columns, you could try reversing it.
-
How to arrange columns in cross tab
Hi,
I have 4 formulae that i need to put in as the columns in a cross tab.
I have added 4 of them in the column section of cross tab expert but when i preview ....it gives me total again and again and repeatetive columns, All i want to view is just 4 columns(for which i have created formula) and grand total column.
Is it possible.
Thanks,
RobinnWow Vinay,
That is so coooooooooool:)
This way i got rid of all the extra columns and extra labels that were appearing on the top.
With this another qs has come.
Now I am getting the column headers as 1094, 0.00,0.00,0.00 and the last one as total.
Is it possible to remove 1094,0.00,0.00,0.00 and get actula column headers ??
Thank you so much,
Robinn. -
Sub-Summarizing columns in Cross Tab
Post Author: valkyriexp
CA Forum: General
Hi,
I'm fairly new in using CR, I wonder if anyone could help me.
I have a cross tab report of projects in rows, activities in columns and hours in table, i need to insert few new columns that have the sum of hours of the selected activities. Is that possible without breaking the report into sub-reports?
some thing like
Act1 Act2 Sum1&2 Act3 Act4 Act5 Sum3&4&5 .....
Proj1 1 1 2 4 2 1 7
Proj2 2 1 3 1 0 0 1
thanks for the helpPost Author: valkyriexp
CA Forum: General
After spending half a day i was able add a new field to each column to does the job, small piece of macro is doing the summation, now i have the problem to set the width of empty fields to zero, can anyone help?
WhileReadingRecords;global NumberVar sumnum;global StringVar OutStr;
if {jobs.acts}="Act1" or {jobs.acts}="Act3" then sumnum:={jobs.hour}else if {jobs.acts}="Act2" or {jobs.acts}="Act4" or {jobs.acts}="Act5" or ... then sumnum:=sumnum+{jobs.hour}else sumnum:=0;
if {jobs.acts}="Act2" or {jobs.acts}="Act5" then OutStr:=cstr(sumnum);else OutStr:="";
the result would be like the following table, now i need to set the width of empty fields to zero:
Act1 Act2 Act3 Act4 Act5 .....
Proj1 1 1 2 4 2 1 7
Proj2 2 1 3 1 0 0 1
Maybe you are looking for
-
anybody facing issues on vodafone in bangalore for iphone 5s. horrible voice breaking occurs. Really frustrting as voice calls break and automaticcaly gets disconnected.
-
Sapscript - print a list with all source code of the windows in layout
hi all, i need a way to print all source code of the layout (include the source of all windows in the layout). thanks, dany
-
Can mac book pro useful for java developer
hi iam a java developer and interested to buy mac book pro. My question is can i do java projects and programming on mac book pro 13?
-
Interesting Logic iTunes bug?
Hello all, I have been trying to overcome this interesting problem the last few days. I have a great mix I've been working on for some time now, and when I bounce the file, everything seems to go fine. When I play the file in Finder, it sounds great,
-
Problem in MergeSort i need it in 1 Hour :-(
Hallo, im trying to implement a Mergesort with test methode but the problem i can not start the code, i need help to solve this problem, that would be perfekt if i get that in 1 hour, i have to give the Answer to my Teacher! hier ist my code: public