How to avoid crosstab - Show number of days according to groups
Morning all,
I think you all would agree with me that even having crosstab as a great tool in Crystal 2008, there are still quite allot of limitations to it.
I have created a report using crosstab which shows number of days and jobs according to those days grouped by account number, product code, sales area. This report is working fine until my director asked me to further group those days according to sub categories of lenses.
For example
Crosstab shows
Number of days - Day 1,day 2, day 3
Number of jobs - 111----123--1213
Percentage - -
12%---34% 60%
Now if you look at the example it says day 1, 111 jobs went out. What the director would like to see is those jobs being sub divided into types of lenses.
So out of 111 jobs, 25 would be Finished lenses, 30 could be uncut lenses and so on.
The new report should be like this
Number of days -
Day1---Day2---Day3
Number of Jobs:-
Finished -
25--34-----23
Uncut--3045-----23
AR--7056-----76
Total----125135----122
Percentage:-
Finished -
25%--34%-----23%
Uncut--30%45%-----23%
AR--70%56%-----76%
Total----100%100%----100%
Now if we look at the above criteria it seems that I have to use groups even further down the report where I am using crosstab at the moment. This means I have to get rid of the crosstab and run a report manually.
However the big question is, how to get the report calculating number of days and jobs according to customer account number, product code and sales area manually?
I tried the following formula but this requires to write way too many formulas, for example some of the jobs have taken more than 60 days and if i use this formula I have to write 60 formulas for number of days which is not feasable.
**//provided by IIbas in another forum**
whileprintingrecords;
numbervar day0;
numbervar day1;
numbervar day2;
if {@workingdays} = 0 then
day0 := day0 + 1 else
if {@workingdays} = 1 then
day1 := day1 + 1 else
if {@workingdays} = 2 then
day2 := day2 + 1 else //up to the maximum number of days.
Then in the report footer, reference the days in separate formulas, and identify them with text boxes, e.g.,
//{@day0};
whileprintingrecords;
numbervar day0;
I can sort out the Finished, uncut,AR by grouping them however I am wondering how to create a manual running total of jobs complying with number of days without using crosstab.
Any ideas?
Many thanks
Regards
Jehanzeb
no answer closing
Similar Messages
-
I am trying to locate an email that I deleted and assume should be in the trash. However my trash now only goes back a few days - how can I increase the number of days the trash remains accessible for.
StevieJ wrote:
I am trying to locate an email that I deleted and assume should be in the trash. However my trash now only goes back a few days - how can I increase the number of days the trash remains accessible for.
Check Mail Preferences, Accounts tab. Select the account, then the Mailbox Behaviors tab. See if you have it set to Permanently erase deleted messages when: One week old. (or less) -
I wanted to know how do you calculate the number of days between two dates
i wanted to know how do you calculate the number of days between two dates in java ? i get both the dates from the database. i guess there are many issues like leap year and Febuary having diff no of months ..etc.
thanks..
I solve my problem as
public class MyExample {
public static void main(String a[]) {
String stdate = "2009-03-01";
java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
java.sql.Date preDate = java.sql.Date.valueOf(stdate);
System.out.println(currentDate);
System.out.println(preDate);
// int dateCom = preDate.compareTo(currentDate);
// System.out.println(dateCom);
long diff = currentDate.getTime() - preDate.getTime();
int days = (int) Math.floor(diff / (24 * 60 * 60 * 1000));
System.out.println(days);
} -
How to show number of days:hours:min:second
Hi !
Need your help on this one:
I have to calculate the number of ( Days;Hours:Minute:Second ) that a ticket have been opened
But I have a problem to display the format that I want: DD:HH:MM:SS
EX:the ticket have been opened 2011-05-03 11:00:00
first I create a formula to show number of second to show how long the ticket have been opened since the currentDate in seconds
Formula Name is:
{@number of seconds OpeningTime}
Crystal Syntax:
DateTimeVar dt1:= {@DTOpenDate};
DateTimeVar dt2:= {@CurrentDateTime};
If dt2 >= dt1 Then
NumberVar ds:= (Date(dt2) - Date(dt1))*86400;
NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600;
NumberVar ms:= (Minute(dt2) - Minute(dt1))*60;
Numbervar ss:= Second(dt2) - Second(dt1);
NumberVar ts:= dshsms+ss)
Else
NumberVar ds:= (Date(dt2) - Date(dt1))*86400;
NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600;
NumberVar ms:= (minute(dt2) - Minute(dt1))*60;
NumberVar ss:= Second(dt2) - Second(dt1);
NumberVar ts:= dshsms+ss)
then I create another formula to display the format that I want:Ex:if the ticket have been opened for about 25hh:00mm:00ss
i want to show 01:01:00:00
DD:HH:MM:SS
Formula name: {@DTConversionOpeningTime}
I use Crystal Syntax:
WhilePrintingRecords;
StringVar Days1;
StringVar Hours1;
StringVar Minutes1;
StringVar Seconds1;
NumberVar Duration:=0;
Duration:= {@number of seconds OpeningTime};
If Duration < 0 Then
"Cannot have a time less than zero"
Else
(Days1:=ToText(Truncate(Duration/86400),0);
Hours1:=ToText(Truncate(Duration/3600),0);
Minutes1:=ToText(Truncate(Remainder(Duration,3600)/60),0);
Seconds1:=ToText(Remainder(Remainder(Duration,3600),60),0));
//Display format
(if length(Hours1) < 2 then '0')+ Days1 + ":" +
["0",""][length(Hours1)]+ Hours1 + ":" +
["0",""][length(Minutes1)] + Minutes1 + ":" +
["0",""][length(Seconds1)] + Seconds1;
Thanks for your helpFind a solution, see thread:
Re: Converting a calculated field into format of dd:hh:mm:ss answered by Jason Long -
GP: How to wait a specific number of days?
Hello everybody,
I am searching for an idea how to create a step in my Guided Procedures process which waits until a specific day (or a number of days from it's start).
I have thought about implementing a Java Callable Object which waits until completing the step - but I fear to create a lot of server load with that.
Does anyone have a different idea?
Maybe there is a way to use due days and a loop?
Thanks for any suggestion
IngoHi,
I think you can do it :
STEP A - Complete
STEP B - Waiting
STEP C - After complete B
You can developer a Job that uses Guided Procedure API (http://help.sap.com/saphelp_nwce10/helpdata/en/44/0d3e1626821c9de10000000a11466f/content.htm) to complete STEP B, based on creation date. This Job can execute on each hour, 15 minutes, day. Or on way that you need.
So, after execute JOB and a step was select, complete it, so STEP C was activated.
JOBS on NetWeaver CE: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90a95132-8785-2b10-bda5-90d82a76431e
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10fed553-0e01-0010-9bb8-ed55659e1236
Other Job alternative: Java Quartz, CRON
Best regards -
How can I subract a number of days from the sysdate() ?
I need to display a date that is a certain number of days older than the current date.
I tried <?xdoxslt:sysdate('yyyy-MM-dd') - 7?> but I get an error.
Any suggestions would be appreciated.I coded this:
test date : <?xdoxslt:ora_format_date_offset(xdoxslt:sysdate(),7, '-')?>
I got this:
test date : 110908 -- today's date, no offset.
What did I do wrong?
I got it to work using <?xdoxslt:sysdate() - 7?> (I removed the formatting from the sysdate), but the date format is 110901, not the most common for displaying purposes.
Any useful hints on how to format the resulting date? -
How can you lower the number of days in IOS8 iPhotos deleted
In IOS8 photos deleted stay for 30 days. Can you lower the number of days?
To answer your Subject (rather than the body of your post)
To get the number of controls, and refs to each, etc, you can combine a
couple of example VIs and a little index finger grease to make a VI that
does what you want:
Help menu >> Find Examples
Find Example Dialog >>Browse tab
Programmatically controlling VIs
Manipulating Applications and VI settings
Edit Multiple VI Setups.vi
New Examples for LabVIEW 6.1
Queues
Queue Control Seek.vi
If these two VIs are put in a mixer and shaken (not stirred) you might come
up with something that tastes write.
Mike Ashe
"GL" wrote in message
news:[email protected]..
> I need to convert llb from 6i to 6.1 and I am unable to, I beli
eve
> because I have to many controls and indicators in the llb. -
How can I get a number of items from a group
I'm trying to load assets into a library. Most of the assets are groups. I'd like to label each asset with number of items from that specific group.
Here is my code:
var d=app.activeDocument;
//create empty library
var library = app.libraries.add(File('mylibrary.indl'));
for(myCounter = 0; myCounter < d.pages.length; myCounter ++){
if(d.pages[myCounter].groups.length > 0){
//how do I get number of items from a group?
var item_count = ?????
}else{
var item_count = '1';
library.store(d.pages[myCounter].allPageItems);
library.assets[0].name=item_count;
Thanks for your help and Happy New Year!!!I figured it out!!!
Here is the solve that worked for me:
var elems = d.pages[myCounter].groups[0].pageItems.everyItem().getElements();
var item_count = elems.length; -
How do I change the number in a Top N Group Sort
I have a report that I have grouped on a particular field (Cust.Name specifically). I then used the group sort expert and selected the Top N selection in the combo box under the Cust.Name tab. I put in a default number of 20. What I want to do is to set this number for the Top N group sort via .NET. Does anyone know the correct method for doing this in either VB.NET or C#.NET. I am using VS 2005 Pro and the embedded Crystal Reports engine for VS.NET. Thank you.
Ed CohenHello, Edgar;
In the bundled version of Crystal Reports 10.2 in Visual Studio .NET 2005 you will need to use the following code:
Private Sub Set_TopN()
Dim TopNSortField As TopBottomNSortField
'Get the Sort field by index
'Cast it as a TopBottomNSortField
If TypeOf crReportDocument.DataDefinition.SortFields.Item(0) Is TopBottomNSortField Then
TopNSortField = crReportDocument.DataDefinition.SortFields.Item(0)
TopNSortField.NumberOfTopOrBottomNGroups = 10
Else
TopNSortField = Nothing
End If
End Sub
In a full version of Crystal Reports there is an option to create a parameter as a number such as {?TopN} and then pass the value to it at runtime.
In the Crystal Reports designer you need to create the parameter and then go to Report|Group Sort Expert.
Choose TopN based on your field.
Where N is... You will need a number there. I used 1. But then I clicked on the Formula editor [X+2] and added the parameter field {?TopN}.
Passing the parameter at runtime ran the number I requested.
Elaine
Edited by: Elaine Dove on Mar 3, 2009 12:12 PM -
How do I reduce the number of days of e-mails showing up in my inbox?
I have my gmail account linked to my iphone 6 plus and currently it downloads all my e-mails...1000s... pretty sure it's draining my battery. I want to reduce the number of e-mails showing in my inbox... so that only e-mails received in the last couple of days or last 1 week show in my inbox. I'm hoping someone can help me set this up? Thanks in advance!
I have my gmail account linked to my iphone 6 plus and currently it downloads all my e-mails...1000s... pretty sure it's draining my battery. I want to reduce the number of e-mails showing in my inbox... so that only e-mails received in the last couple of days or last 1 week show in my inbox. I'm hoping someone can help me set this up? Thanks in advance!
-
How can I set the number of day that FF remembers a visited site?
Using FF 8, a visited site link turns color to show it has been visited. I would like to have that color go back to normal after 14 days. In other words, I want FF to remember that I visited a site by turning the link a different color for only 14 days. Right now it seems to last forever. The link never changes back to normal, so I can't easily tell when I was last on the site.
I do use sync.
I looked through the about:config, but don't seem to be able to find a pref that will do this.You can do it manually if you like with code in the Error Console.
Copy and paste the code in the Code field in the Error Console and click the Evaluate button.
*Firefox/Tools > Web Development > Error Console (Shift+CtrL+J)
See http://kb.mozillazine.org/User:Dickvl/JavaScript_Error_Console#Expire_History_By_Days -
How to Avoid Duplicate Employee Number in Custom Form
Developing A new employee screen, where all the Personal, Assignment, Visa, Passort & Tickets are capture and send for approval. Once it is done. Scheduled Concurrent Program will pick the APPROVED records and create the Employee & Assignment in the HRMS.
In custom form the employee Number is Last Employee Number in HRMS and Get the Last Employee Number in Custom table (always Custom table employee is higher) and increment by 1 whichever is higher.
This code written on ON-INSERT trigger.
SELECT MAX (TO_NUMBER(employee_number)) + 1 INTO v_max_empno
FROM per_all_people_f
WHERE employee_number != 99999
AND REPLACE ( TRANSLATE (employee_number, '1234567890', '~~~~~~~~~~'),'~', NULL) IS NULL
AND business_group_id = :parameter.bg_id ;
SELECT MAX (TO_NUMBER(employee_num)) + 1 INTO v_max_empno2
FROM xx_employee_details
WHERE business_group_id = :parameter.bg_id ;
IF v_max_empno2 IS NOT NULL THEN
v_emp_number := v_max_empno2 ;
ELSE
v_emp_number := v_max_empno ;
END IF ;
:xxempdet.employee_num := v_emp_number ;
Issue.
The above is working fine only when data entered from single machine. When multple users are access this form we are getting Duplicate Employee Numbers.
I need to impliment the process which is Sales Order Number generation without GAPLESS.
Regards/PrasanthMake use of Sequence and use sequence.nextval for fetching the next value to ensure unique values.
Thanks
Shree -
How do I only show one adressee when sending a group e-mail?
I use ACT database on a PC and would like to buy a Mac but I have one problem. When I send an e-mail to a group, in the "To:" it shows only one person, not the entire group. I work with the media so each editor or reporter thinks I am sending an e-mail only to them which is the protocol in my business. Can I do that on the Mac?
(In other words, I am sending out a news release to 50 editors. I don't want each editor to see that I am sending it out to 49 other editors. I want it to say TO: that particular editor, From: me)
GatewayCan I do that on the Mac?
Yes by placing all contacts in the Bcc: (Blind Carbon Copy) field which can be added to the Mail.app message header by default in addition to the To: and Cc: fields. -
How to avoid duplication of vendor name and vendor account group
Let me know the menu path for setting in SAP - controlling / avoid duplication vendor name and vendor account group in one purchasing organisation during creation of vendor / uploading mass data.
with regards
vvHi,
See vendor code is unique no. But the name is not at all unique. so system allow to create duplicate record.
by giving authorization to single person only you can do it.
system discipline is actually required -
How to get the number of days in a month?
hi all
is there any way to get the number of days in a given month with a given year? for instance, if year is 2004 and the month is July or February, how can i get the number of days? thanks.Gee, I don't know ... Maybe this:
Calendar cal = Calendar.newInstance();
cal.set(Calendar.YEAR, 2004);
cal.set(Calendar.MONTH, Calendar.FEBUARY);
System.out.println("max days in month: " + cal.getActualMaximum(Calendar.DAY_OF_MONTH));
Do you not bother reading what people have already posted? Read the API docs on the Calendar class.
Maybe you are looking for
-
When KM Scheduler is stopped or not running
Hi Experts, I have created KM Scheduler using the blog https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1515.Scheduled for every 30 mins. In Systemadmin>Monitor> KM-->i can see whether Scheduler is running or not. Now the requirement is to send
-
How can I insert chapters in my idvd slideshow?
I am making a slideshow for a family event, marking different times in my couin's life. How can I insert chapters marking different pictures from various milestones? (i.e. birth, growing up, etc.) Is it even possible to do that?
-
I have a large iPhoto library (about 130,000+ images). Recently I added a whole lot from another Library, and now I have a smattering of many grey'ed out "palm tree" images, like events, only just showing drawings of palm trees. I think the photo i
-
USB External drive for PC & Mac Via Home Hub 2
Hi Guys, I have a home hub 2.0, I also have a 1TB External USB drive, I have connected the drive to the USB port on my Hub and I can see the drive on my pc, wirelessly (Windows 7), I know nothing abouy MAC's, but my wife has one and it would be great
-
I was always wondering, why is there an arch linux sub-forum on the ubuntu forum?