Associate a record name with a running total in Report Footer
Please Help!
I have a report that returns records for the most recent order recieved by vendor.
The page header displays Vendor, Contact, Order #, and date
I did a group by Vendor
I used a running total on the order date
with a summary of minimum
that evaluates on change of group
Reset never
This returns the last order date for the vendor with the oldest order
How can I get the vendors name that is associated with the oldest order date to display in the Rport Footer.
Please follow the following steps: I tested it and it works.You dont need to use running total.
1. Add the Vendor,Contact,Order #, Order Date to Details Section (u can delete them if not needed from details section)
2. Create a Group on Vendor.
3. Add a Summary i.e. Minimum(Order Date)
4. Copy this summary to Group Header if you want or just let it be in the Group Footer Section
5. Add a SubReport in the Report Footer Section.
6.The Subreport Should be based on the Command like:
SELECT `Orders`.`Customer ID`, `Orders`.`Order Date`
FROM `Orders` `Orders`
WHERE `Orders`.`Order Date`=
SELECT MIN(`Orders`.`Order Date`)
FROM `Orders` `Orders`)
7. Refresh the Report and you will see that Report Footer section displays all the vendors with minimum order date along with their name.
One more thing to keep in mind is that more than one vendor might have the same minimum order date.
Similar Messages
-
Running total in report footer returning inaccurate result
Post Author: smarkta
CA Forum: Formula
I am writing a report that contains 3 groups. I have created running totals for each group that are accurate by selecting the group to evaluate and reset on. now I need to basically sum the results of the all the group running totals but have had no success. any tips on how to do this would be greatly appreciated.
ThanksPost Author: Charliy
CA Forum: Formula
Were you doing a Distinct Count? Did you have a formula on the Running Total? What is there about the Group Totals that make them different than the final total. -
Hi,
Can any one tell me how to create a running total in Oracle reports. I have two fields pulled in the SQL called CR and DR. I want to do the running total at report level. Here what I want
CR------DR-------RTOTAL
20-----10---------10 ( here the RTOTAL Field is (20 - 10) )
30-----15---------25 ( here the RTOTAL Field is (30 - 15) + 10)
50-----25---------50 ( here the RTOTAL Field is (50 - 25) + 25)
75-----35---------90 ( here the RTOTAL Field is (75 - 35) + 50)
Thanks
-FerozHello,
You can use the following SQL query :
select cr,dr,cr-dr cr_minus_dr from <table> ...
and create a Summary Column in the Reports :
Source : the field cr_minus_dr
Function : Sum
Regards -
Running totals at the footer of the report
I want to create running totals but print them not in e.g. in a group footer. All totals should be printed at the end of the report. The number of needed running totals is not defined before, it depends on the number of different grouping criterias:
Example
Criteria Amount
1995 10
1995 10
1996 20
1997 30
1997 10
At the end of the report shoul appear the following:
1995 20
1996 20
1997 40
There could be more criteria in the report (e.g. 1998 or 1999), but it is not defined before I start the report.
Thank you for your supportHi Torsten,
If you want to create year wise running totals without considering groups, you can create like :
go in Field ExplorerRunning TotalsRight click and select New
Give the name as 1995 and select Field to summarize and select Sum as type of summary
In Evaluate select Formula and give a formula like : Year = 1995
In Reset do not reset. You get the value of 1995 year this can be placed at the end of your report.
You may have to create different funning total for different year.
Thanks,
Sastry -
PL/SLQ - How to create query with horizontal running totals
Hi:
I'm trying to create a report in the following format
Year Name Reg1 Reg2 Reg3
2001 Al 3 4 5
2001 Le 4 1 1
2001 7 5 6
2002 Sue 2 4 1
2002 Al 1 3 6
2002 Jim 6 1 3
2002 16 15 16
2003 Jim 4 -3 2
2003 Le -2 4 5
2003 20 16 23
Note that the totals are accumulating horizontally, broken on year. How do I do that, please? Thanks very much!
AlHi, Al,
Welcome to the forum!
978108 wrote:
Hi:
I'm trying to create a report in the following format
Year Name Reg1 Reg2 Reg3
2001 Al 3 4 5
2001 Le 4 1 1
2001 7 5 6
2002 Sue 2 4 1
2002 Al 1 3 6
2002 Jim 6 1 3
2002 16 15 16
2003 Jim 4 -3 2
2003 Le -2 4 5
2003 20 16 23 You may have noticed that this site normally doesn't display multiple spaces in a row.
Whenever you post formatted text (such as query results) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
If you do that, your desired output will be much more readable:Year Name Reg1 Reg2 Reg3
2001 Al 3 4 5
2001 Le 4 1 1
2001 7 5 6
2002 Sue 2 4 1
2002 Al 1 3 6
2002 Jim 6 1 3
2002 16 15 16
2003 Jim 4 -3 2
2003 Le -2 4 5
2003 20 16 23
Note that the totals are accumulating horizontally, broken on year. How do I do that, please? Thanks very much!
AlHere's one way to do that:WITH yearly_summary AS
SELECT year
, SUM (SUM (reg1)) OVER (ORDER BY year) AS reg1
, SUM (SUM (reg2)) OVER (ORDER BY year) AS reg2
, SUM (SUM (reg3)) OVER (ORDER BY year) AS reg3
FROM table_x
GROUP BY year
SELECT year, name, reg1, reg2, reg3
FROM table_x
UNION
SELECT year, NULL, reg1, reg2, reg3
FROM yearly_summary
ORDER BY year, name
Edited by: Frank Kulash on Dec 20, 2012 3:04 PM
Corrected query.
Whenever you have a problem, please post CREATE TABLE and INSERT statements for your sample data. For example:CREATE TABLE table_x
( year NUMBER
, name VARCHAR2 (10)
, reg1 NUMBER
, reg2 NUMBER
, reg3 NUMBER
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2001, 'Al', 3, 4, 5);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2001, 'Le', 4, 1, 1);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2002, 'Sue', 2, 4, 1);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2002, 'Al', 1, 3, 6);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2002, 'Jim', 6, 1, 3);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2003, 'Jim', 4,-3, 2);
INSERT INTO table_x (year, name, reg1, reg2, reg3) VALUES (2003, 'Le', -2, 4, 5);
Also, say which version of Oracle you're using. In this case, it may not matter. The query above will work in Oracle 9.1 and higher. -
How to replace a table name with an item value in report region SQL query?
I've got a SQL query in a report region that goes like this:
SELECT :P30_HIDDEN FROM v_dms_dataset
GROUP BY :P30_HIDDEN
P30_HIDDEN is populated from a textfield input. Why doesn't this work, and is there a way to achieve what I'm trying to do here? I really need the ability to dynamically generate SQL queries in this way.Ben - you could either:
1. case when :P30_HIDDEN = 'COL1' then col1 else ... end
in order to determine which column to select (only really useful if you have a small number of predetermined columns to select from), or
2. generate the SQL dynamically.
Set the report region to SQL Query (PL/SQL function body returning SQL query), then have something like:
declare
l_sql VARCHAR2(4000);
begin
l_sql := 'SELECT ' || :P30_HIDDEN || ' FROM v_dms_dataset
GROUP BY ' || :P30_HIDDEN;
return l_sql;
exception
etc.
end;
John. -
Running total for item availbe qty. from On Hand - SO + PO by promise date
I stuck with Balance(running total).
How to link item number with SO and PO?
Need daily item qty. available qty from "On Hand" Qty. + PO - SO by promise date and sort by ascending?
Item# Order Date SO/PO PromiseDate Qty Bal.
AE01 08/01/08 OnHand 20 20
08/02/08 SO#1877 08/05/08 -3 17
08/04/08 SO#2044 08/08/08 -6 11
07/22/08 PO#632 08/10/08 10 21
Thanks.create a group by promise date
2nd group by po#
put the fields either in the group or in the details
PO#, PO promise date, qty and SO#, SO promise date, qty then availability qty
manual running totals
create 3 formulas
1 reset
WHILEPRINTINGRECORDS;
NUMBERVAR ITEMLOC := 0;
place in the group header on what you want the total to reset by (po#)
1 calc
WHILEPRINTINGRECORDS;
NUMBERVAR ITEMLOC := ITEMLOC +(qty};
this gets placed where the calculate will take place (next to qty)
1 display
WHILEPRINTINGRECORDS;
NUMBERVAR ITEMLOC;
ITEMLOC
this gets placed in the group footer.
for each field that gets calculated by a group create 3 formulas for each
they need to have the same variable name to reference each other.
if you need to create a 2nd set to calc something else give that a new variable name. -
XI Sp2 running totals formula working strange
Post Author: oskaratk
CA Forum: Formula
Hi,I seem to have a problem with a running totals formula:for totaling, in the detail band: formula "totalall"WhilePrintingRecords;CurrencyVar balance;CurrencyVar grs_amt;grs_amt := grs_amt + { detail.bal_grs_amt};balance := balance + { detail.bal_balance};''; display in group footer:WhilePrintingRecords;
CurrencyVar balance; in case the first record has a negative value, it is not subtracted from balance if I switch the order the statements are executed
balance := balance + { detail.bal_balance};grs_amt := grs_amt + { detail.bal_grs_amt};
''; balance is updated correctly also, in case I created a formula for each varible to be totaled, that works; like:formula "totalgrs_amt" WhilePrintingRecords;
CurrencyVar grs_amt;
grs_amt := grs_amt + { detail.bal_grs_amt};''; formula "totalbalance" WhilePrintingRecords;
CurrencyVar balance;
balance := balance + { detail.bal_balance};
''; Am I missing something, is this intended bahavior or maybe a bug? Thanks for any hintsOskarI found that putting them in the footer works, but in the header does not. Formula fields can summarize in the header. But running total fields cannot???
Thanks,
W. -
I am fairly new to Crystal Reports and Running Totals. I have a group setup that is based on the number of days a loan is late. For example, I have three buckets (30 Days, 60 Days, 90 Days). In setting up the group, I put the group in specific order and decided to exclude the other loans that are less than 30 days. I am trying to get a total $ amount of all the loans instead of just the loans in the buckets. I have searched forums and a Crystal 2008 book trying to figure this out. I tried using a Running Total with the Running Total expert but it is still giving me the same grand $ total that I have for the groups I selected. Any ideas? I am bit confused as to the multipassing of the data. Should I keep the groups setup the way I have them or use the select expert (etc).
Thanks, I am a newbie.i suggest manual running totals, more accurate and if you have duplicate values the summary option will duplicate the data
create 3 formuls
i reset
whileprintingrecords;
numbervar x:= 0;
this gets placed in the group header
calculate
whileprintingrecords;
numbervar x:= x + field or formula;
this gets placed next to the field or formula you want calculated
display
whileprinitngrecords;
numbervar x;
x
this gets displayed in the footer of where the reset is (header)
using manual running totals, if you have data on the report you dont want included you can create a formula that will only calc based upon only what should be included. -
Associating Skype's user name with the phone number!
Hello there, I always love using Skype but I haven't been using it that much recently due to the rise of other video chat apps like FaceTime. I think one of the struggles that Skype users face is the need to know their friends exact user name or email address. In my opinion, adding the ability to associate Skype user name with a phone number (like Whatsapp & FaceTime) would make it much more convenient and will help Skype to spread to more users especially with the availability on all phones OS.
Hi jjthexer,
here, I'll throw in a frame you can use by adding the meat of the script into it:
# The path where you store your csv file that includes the user-information
$path = "C:\ExampleFolder\example.csv"
# Load the Csv file into PowerShell
$users = Import-Csv $path
# Now do for each of those
foreach ($User in $users)
# Step 1: Check whether the user exists
# Step 2: If it exists, add telephone number to AD object
You'll need to figure out how to fill out the foreach loop yourself (there are plenty of learning ressources here on technet to do so on your own), or wait until someone else cheats and tells you more ;).
Noticed that I changed the "Get-Content" into "Import-Csv"? It alters the way you receive the data. Suffice to say, Import-Csv is cooler when dealing with Csv files. Try out these two commands (after declaring the path variable to your csv file) to see the
difference:
(Get-Content $path)[1] | FL *
(Import-Csv $path)[0] | FL *
Another thing you used is the add-pssnapin command. What this does is load the Quest Commands to access the Active Directory. For it to work, you need to have these installed. There is a Microsoft native command set that is available on all computers that
have an AD Management Console. Either of those will work, if you meet the stated prerequisites. Both are best placed at the head of the script. Here are the two commands again for reference:
# Load Quest AD Cmdlets
Add-PSSnapin quest.activeroles.admanagement
# Load Microsoft AD Cmdlets
Import-Module ActiveDirectory
Hopefully, that info will be of some help to you :)
Cheers,
Fred
There's no place like 127.0.0.1 -
Hi,
Can any one tell me how to create a running total in Oracle reports. I have two fields pulled in the SQL called CR and DR. I want to do the running total at report level. Here what I want
CR------DR-------RTOTAL
20-----10---------10 ( here the RTOTAL Field is (20 - 10) )
30-----15---------25 ( here the RTOTAL Field is (30 - 15) + 10)
50-----25---------50 ( here the RTOTAL Field is (50 - 25) + 25)
75-----35---------90 ( here the RTOTAL Field is (75 - 35) + 50)
Thanks
-FerozHi Bernd ,
I tried this and here is the result.
Query :
SELECT MAIN_AC_CODE, JV_NO_T, JV_DATE_T, JV_DR_AMT, JV_CR_AMT, SUM(JV_DR_AMT - JV_CR_AMT) OVER ( PARTITION BY MAIN_AC_CODE ORDER BY MAIN_AC_CODE,JV_NO_T) RUNNING_TOTAL
FROM FIN_JV_T WHERE MAIN_AC_CODE = 1102071001
ORDER BY MAIN_AC_CODE, JV_NO_T , JV_DATE_T
output :
MAIN_AC_CODE JV_NO JV_DATE DR_AMT CR_AMT RUNNING_TOTAL
1102071001 JV1 05-JUL-06 6000 0 -11650
1102071001 JV1 05-JUL-06 0 17650 -11650
1102071001 JV13 15-JUL-06 15000 0 12750
1102071001 JV13 15-JUL-06 30000 0 12750
1102071001 JV13 15-JUL-06 7000 0 12750
1102071001 JV13 15-JUL-06 0 30200 12750
1102071001 JV13 15-JUL-06 1500 0 12750
1102071001 JV13 15-JUL-06 1100 0 12750
1102071001 JV14 16-JUL-06 1100 0 16358
1102071001 JV14 16-JUL-06 2508 0 16358
1102071001 JV15 16-JUL-06 3609 0 19872
1102071001 JV15 16-JUL-06 0 95 19872
1102071001 JV16 16-JUL-06 0 3608 16264
1102071001 JV19 17-JUL-06 17000 0 -6668
1102071001 JV19 17-JUL-06 0 22932 -6668
1102071001 JV2 05-JUL-06 84000 0 18213
1102071001 JV2 05-JUL-06 0 59119 18213
1102071001 JV20 17-JUL-06 0 13000 5213
1102071001 JV21 17-JUL-06 0 4000 1213
1102071001 JV4 05-JUL-06 28134 0 -31786.57
1102071001 JV4 05-JUL-06 0 61133.57 -31786.57
1102071001 JV5 05-JUL-06 0 2970 -34756.57
1102071001 JV7 05-JUL-06 5500 0 -29256.57
1102071001 JV8 09-JUL-06 12500 0 -39147.57
1102071001 JV8 09-JUL-06 0 22391 -39147.57
1102071001 JV9 12-JUL-06 6740 0 -45107.57
1102071001 JV9 12-JUL-06 0 12700 -45107.57 -
How do I put a running total in a Reports 6i Report?
I need to write a report which shows a running total at the foot of each page. The report is a series of (potentially) multi-page sections each formatted like this:
Page 1
======
Tom £100
Dick £150
Harry £100
Sub Total £350
Page 2
======
Peter £200
Paul £50
Mary £100
Total £700
Lines are of variable height, so I can't predict how many there'll be on a page.
The help system just tells me to "use a summary field". Yeah, right. Can anybody give me some more detailed instructions?
-- Chris HuntThanks for that.
I didn't really express the problem as well as I might have done, as the Sub-Total needs to be the sum of all the items on the current page and on all preceeding pages. resetting on page just gives you the total for that page.
I did find a way to do it. First you set up a summary field in the same group as the data lines, summing the amount and resetting on the parent group. This gives you a running total for each row:
Page 1
======
Tom £100 £100
Dick £150 £250
Harry £100 £350
Page 2
======
Peter £200 £550
Paul £50 £600
Mary £100 £700
You don't actually output this summary field in the prinout (except when debugging :-) ). Now create a summary field at the foot of the page, or in the margin. Set its value to the Max() of the running total summary, resetting on page. That gives you the amount required, assuming all individual amounts are positive.
If it's possible to have negative amounts, I expect that using Last() instead of Max() for the page summary would do the trick. -
How can I display the vendor associated with result of my running total sum
I have a report that lists vendors with their most vecent order dates. I need to set up a rotation so that the vendor with the latest order date is next to be selected. I used the running total summary to pick the latest date. How can I display the vendor associated with result of my running total summary?
If your "latest" order date means the "oldest" order date, why don't you try this:
Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
This will make your oldest order your first record shown.
You can then create a running total count for each record.
Lastly, in your section expert under conditional suppress X+2 formula, write this:
{#CountRecords}>1
The result will only show the oldest record in your report.
I hope that helps,
Zack H. -
How can I map the composite_dn name with a composite in run time
Hi All,
I want to craete a report on number of total business and system faults with the help of Information Publisher in OEM 12c Cloud Control. I am fetching data from the table composite_instance_fault present in SOAINFRA schema. Below os my SQL statement:-
select error_category,count(error_category) from prefix_SOAINFRA.composite_instance_fault where composite_dn=??EMIP_BIND_TARGET_GUID?? group by error_category
Now I want to know that how can I map the composite_dn name with a composite in run time. When we fetch data from the repository we used to map target in rumtime by using ??EMIP_BIND_TARGET_GUID?? but here as I am not fetching data from repository, how can I map target in run time.
On executing the above SQL statement its returing an empty table without any data.
Please guide!!
Thanks in Advance!!Hi,
try something like this.
Mike
Attachments:
Unbenannt 5_LV80.vi 12 KB -
How to create a loop to run total of records for before and after unconstant date
Post Author: Ann2
CA Forum: Formula
Here is the data sample:
ID period code date
1 00 I 01/01/1999
1 00 Z 01/02/1999
1 00 G 12/05/1999
1 00 M 01/01/2000
There are many students with many periods and many codes. I need to save a date when code = 'G' and count separateley records per student/period 2 times - before and equal that date and after that date, so in the end for period 00 I will have 2 values: 3 (before) and 1(after).
There are periods from 00 to 08. I am counting students abscencies before and after warning letter was sent (code G).
The result data should look : 00 01 02 03 04 05 06 07 08 00 01 02 03 04 05 06 07 08 Total
3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 4
Please help me.
Thank you.
Ann2Post Author: Ann2
CA Forum: Formula
Thank you for your answer, but I do care about the date the 'G' happened, because I need to reset count.
The logic behind is this:if a student absent for more than 8 times per period - the letter will be sent out to the parents , that will be code 'G' with period '-1' (it may happen that there will never be code 'G' , but I need to track all absencies). Once the letter is sent, the count starts over (the count starts over the next day after code 'G'). The absencies which happened before or the date the letter sent should count toward 'previous' abscenices, all other - absenices after the letter.
So basically I need total per period and total per period before or the day with code 'G'. Running total with reset with formula code = 'G' does not work.
I created a formula field which has global date (when code 'G' happenned) and it says if globaldate >= periodDate then date (1900,01,01) else (2100,01,01) and that formula is ok, but I can not use it in running total or can not create group on it and insert total.
Please help me with this. Thank you.
Ann2
Maybe you are looking for
-
How do you get sound through the dock connector to a PC or Mac?
Where I work they have blocked the Pandora website. (Along with just about every other online radio site.) They don't mind if we listen to music, as long as it's not streamed online through their network. I have both a PC & a Mac on my desk. What I w
-
Creating a pivot table view with two levels of headers
Hi, I have a requirement in which i need to have a common heading for two or more columns. For Example, I have two columns like total number of loans and Total loan amount. As per my requirement, i need to give a common header 'Total loan' as the mai
-
This is my first attempt at this and I have not been able to find out if and how to do this. Is it possible to place a piece of content (schematic, for example) by specifying a URL, rather than referring to a file using a standard windows path? I ap
-
Undefined symbol: nzdacvalue on Admin Tool
I had a real sweet setup: 64 bit Red Hat Enterprise Server 5.1 running Oracle 11g 11.1.0.6.0 - 64 bit. OBIEE server on the same machine, 10.1.3.4.0 (both the analytic server and the presentation server) I was doing development on a local Windows mach
-
DBUM Connector Prepopulate 1 Role?
Hello everyone, I am currently using OIM 11g (11.1.1.3.0) and need to have my DBUM connector provision all users with the ability to 'Create a Session' within my target databases. I know this can be done either by provisioning the Create Session priv