I'm building a report using the matrix control. I have financial data in
different line items (Salary, Rental Expense etc) that needs to be shown by
month (so the columns have months). I have it pretty much working but can't
figure out how to sum up the numbers in each column at the bottom so I can
have a total for every month. Could anyone help?
Thanks a lot.
BobRight-click on the row field that you wish to total, in your case it
would be the Salary field. Choose Sub-total from the menu.
To format the subtotals you need to right-click->properties on the tiny
green triangle that appears on the Total cell.|||ahhh. I was thinking this must be something really simple since it's such a
common function. You can't believe how much time I had spent trying to
figure this out. Thanks a lot.
Bob
"grahamiec" <grahamrichter@.gmail.com> wrote in message
news:1123769689.664448.10490@.g14g2000cwa.googlegroups.com...
> Right-click on the row field that you wish to total, in your case it
> would be the Salary field. Choose Sub-total from the menu.
> To format the subtotals you need to right-click->properties on the tiny
> green triangle that appears on the Total cell.
>
Showing posts with label line. Show all posts
Showing posts with label line. Show all posts
Monday, March 26, 2012
Friday, March 9, 2012
How to sum up the last 12 line in the report of each line
Hi all,
I'm new in crystal report and I've created a report and get a set of data.
I want to add a new value in each line which can sum all the last 12 line at the top of itself. (such as select sum in running total field but only sum last 12 records)
I tried to use the running total field but have no idea about how to setup the reset formula
pls help
thanks
Regards,
KinCan be done with a manual running total. But you need to store 12 previous values to memory variables and rotate them manually, to be able to subtract the last value in queue and add the current value. A bit of code to write but it should work.|||Can be done with a manual running total. But you need to store 12 previous values to memory variables and rotate them manually, to be able to subtract the last value in queue and add the current value. A bit of code to write but it should work.
Hi wapper,
Any example or reference website about how to do it?
Sorry, I m new in crystal report..
Regards,
Kin|||http://support.businessobjects.com/library/kbase/articles/c2006365.asp
You might want to search the knowledge base for more information on "manual running total".
Manual running totals give you control on HOW the summary is evaluated. Ordinary running totals only allow you to choose WHEN to evaluate.|||Thanks|||I tried to create the followings.
the value
Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly")
is the variable (which grouped by month in crystal report) which I need to sum, my problem is I need to sum up the last 12 months where the variable is grouped by another date (X.effdt)
How to group the last 12 months.. (I can get the variable but don't know how to get the past 12 months.
Sorry for question about this again.
pls help.
thanks
Dim i as number
dim total as number
total = 0
for i = 1 to 12
total = total + Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly")
next i
formula = total|||Someone else was trying to do something similar recently. I take no credit for this solution ;)
The key here is to constantly track the previous 12 months and calculate the current month.
// formula {@.Last12months} - place this formula in your "month" group footer. The '...' bits are for you to fill in!
WhilePrintingRecords;
NumberVar mth1;
NumberVar mth2;
...
NumberVar mth12;
NumberVar All12months;
mth1:= mth2;
mth2:= mth3;
...
mth11:= mth12;
mth12:= Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly");
All12months:= mth1 + mth2 + mth3 + ... + mth12;
I guess you can then create another formula to return the All12months value and put it where you want it, i.e.
// formula {@.All12months}
WhilePrintingRecords;
numbervar All12months|||it works.
thanks
I'm new in crystal report and I've created a report and get a set of data.
I want to add a new value in each line which can sum all the last 12 line at the top of itself. (such as select sum in running total field but only sum last 12 records)
I tried to use the running total field but have no idea about how to setup the reset formula
pls help
thanks
Regards,
KinCan be done with a manual running total. But you need to store 12 previous values to memory variables and rotate them manually, to be able to subtract the last value in queue and add the current value. A bit of code to write but it should work.|||Can be done with a manual running total. But you need to store 12 previous values to memory variables and rotate them manually, to be able to subtract the last value in queue and add the current value. A bit of code to write but it should work.
Hi wapper,
Any example or reference website about how to do it?
Sorry, I m new in crystal report..
Regards,
Kin|||http://support.businessobjects.com/library/kbase/articles/c2006365.asp
You might want to search the knowledge base for more information on "manual running total".
Manual running totals give you control on HOW the summary is evaluated. Ordinary running totals only allow you to choose WHEN to evaluate.|||Thanks|||I tried to create the followings.
the value
Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly")
is the variable (which grouped by month in crystal report) which I need to sum, my problem is I need to sum up the last 12 months where the variable is grouped by another date (X.effdt)
How to group the last 12 months.. (I can get the variable but don't know how to get the past 12 months.
Sorry for question about this again.
pls help.
thanks
Dim i as number
dim total as number
total = 0
for i = 1 to 12
total = total + Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly")
next i
formula = total|||Someone else was trying to do something similar recently. I take no credit for this solution ;)
The key here is to constantly track the previous 12 months and calculate the current month.
// formula {@.Last12months} - place this formula in your "month" group footer. The '...' bits are for you to fill in!
WhilePrintingRecords;
NumberVar mth1;
NumberVar mth2;
...
NumberVar mth12;
NumberVar All12months;
mth1:= mth2;
mth2:= mth3;
...
mth11:= mth12;
mth12:= Sum ({@.totalResignTurnover}, {X.EFFDT}, "monthly");
All12months:= mth1 + mth2 + mth3 + ... + mth12;
I guess you can then create another formula to return the All12months value and put it where you want it, i.e.
// formula {@.All12months}
WhilePrintingRecords;
numbervar All12months|||it works.
thanks
How to Sum last three groups
I have a report that has a Payment field on the details line. It is then grouped by Month. The group footer contains a sum of the payments for that month.
How do I create a formula that displays the sum for the last three months?
Mon Sum 3monthSum
Jan 20.00 20.00 //(Jan)
Feb 10.00 30.00 //(Jan - Feb)
Mar 40.00 70.00 //(Jan - Mar)
Apr 30.00 80.00 //(Feb - Apr)
May 15.00 85.00 //(Mar - May)
Thanks,Do you want to find summation of sum of each month?
Make use of Running total feature
How do I create a formula that displays the sum for the last three months?
Mon Sum 3monthSum
Jan 20.00 20.00 //(Jan)
Feb 10.00 30.00 //(Jan - Feb)
Mar 40.00 70.00 //(Jan - Mar)
Apr 30.00 80.00 //(Feb - Apr)
May 15.00 85.00 //(Mar - May)
Thanks,Do you want to find summation of sum of each month?
Make use of Running total feature
Wednesday, March 7, 2012
how to store Linefeeds to a database and retrieve them
hello all,
I have a multi line textbox and want to store the content of the textbox to a database. I want to preserve the linefeeds so that I display the message as it is typed by retrieving it. Can anyone please explain how to store the linefeeds to the database. Once i store the linefeeds to the database, I can restore them using the Replace("\n","<br/>) method. But I can't figure out how to store the \n 's in the database in the first place.
Thanx in advance
look into Environment.NewLine.
|||The Environment.Newline is for VB.net
But in C#, \n is automatically stored in the database and I jus need to replace it with <br /> using replace method.
Thanx for the reply
Subscribe to:
Posts (Atom)