Running Total not working
Dear all,
I am creating a new report which needs a conditional running total.
I need to sum the credits quantity if the following condtions are met
line_type="S" and
line_no<3
I used running total like this
Field to summarize: lab_credits2.credit_qty
Type of Summary: SUM
Evaluate: Use formula
{lab_credits2.line_type}="S" and
{lab_credits2.line_no}<3;
Reset: On change of group (Reason Code).
When I ran the report, it did not produce the right results, so I placed the line type and line no into the same Group footer and ran the report.
I found out that the report is not filtering the linetype and line no.
Result shows
Line Type ="S" - 100 - Line number =1
Line Type = "M" - 200 - Line number=6
and so on.
The report is grouped by Reason Code.
Any ideas why would it not be filtering the records?
Report Record Selection Code
{lab_credits.credit_date}>={?startdate} and
{lab_credits.credit_date}<={?enddate} and
{lab_credits.credit_status} = 2;
Status=2 is needed there to filter the Order numbers correctly.
Many thanks
Regards
Jehanzeb
Thanks James,
I have put all three in detail and used the filteration and it worked under detail section however the results when used in total SUM is produced incorrectly.
I suspect it might be of database table linkage? or maybe I have done something wrong in the report.
I am going to create another report and see if that works.
Will post info here.
Regards
Jehanzeb
Edited by: Jehanzeb Navid on Sep 4, 2008 11:55 AM
Right I found the issue however I don't know how to resolve it.
I have 4 tables in the database
1: Lab Credits - Order_num, Credit_status, Reason_code
2: Lab Credits2 - Order_num, Line_no, Line_type, Credit_qty
3: Lab Reasons - Reason_code,Reason_description
4: Oetrn2 - Order_num
This is how they are linked up
Lab_Credits_Order_num = Lab_credits2_order_num and oetrn2_order_num
Lab_Credits_Reason_code = lab_reasons_reason_Code
Report Grouping
Grouped by Reason Code
Date range - month to date
Report Record Selection
{lab_credits.credit_date} in monthtodate and
{lab_credits2.line_no}<3 and
{lab_credits2.line_type}="S" and
{lab_credits.credit_status}=2;
Now the issue
When I add sum of qty of lab_credits2_credit_qty into the report Group footer,it produces the right results However when I add
DistinctCount of Oetrn2_Order_num into the Group footer, it creates totally different Sum of Lab Credit Qty results. (Please note: The oetrn2_order_num results appear fine, however they messup Sum of Lab_credit_credit_qty).
What do you think where am I doing wrong?
It has to be something to do with table linkage.
Regards
Jehanzeb
Similar Messages
-
Running Total not working correctly
I have a running total setup inside a for loop, the problem is that the running total isn't "running" . Below is the syntax
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
<?xdoxslt:set_variable($_XDOCTX,’DUPE’, xdoxslt:get_variable($_XDOCTX, ‘DUPE’ ) +1) ?>
<?for-each-group@section:/ TMP008/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE;G_INVOICE?>
TABLE HERE+_
<?end for-each?><?end for-each?>
I am using this loop to print 3 copies of an invoice, then by using the running total I am trying to call a unique footer on each copy by having the following code in the footer.
<?choose:?>
<?when: xdoxslt:get_variable($_XDOCTX,’DUPE’)=”1”?>
<?call:Footer1?>
<?end when?>
<?when: xdoxslt:get_variable($_XDOCTX,’DUPE’)=”2”?>
<?call:Footer2?>
<?end when?>
<?otherwise:?>
<?call:Footer3?>
<?end otherwise?>
<?end choose?>
What is happening is the first copy is using Footer 3 and the other 2 copies are using Footer 1. FYI at the top of the rtf I have a import statement and set_variable statement as shown below:
<?import:file:///C:\Documents and Settings\username\Desktop\MasterFooter.rtf?>
<?xdoxslt:set_variable($_XDOCTX,’DUPE’, 0)?>
The variable DUPE is getting the value 1 on every page which I don't quite understand.
Any help would be greatly appreciated. I can attach the xml file and rtf if so desired. ThanksFirst initialise a variable and assign it value zero (with this code..)
<?xdoxslt:set_variable($_XDOCTX, 'RunTotVar', 0)?>
then embed the following code within the for loop where you want the running total displayed..
the code below shows a running total for the xml field INVOICE_AMT
<?xdoxslt:set_variable($_XDOCTX, 'RunTotVar', xdoxslt:get_variable($_XDOCTX, 'RunTotVar') + INVOICE_AMT)?><?xdoxslt:get_variable($_XDOCTX, 'RunTotVar')?>
Hope this helps. its from one of the examples provided with the template builder for word.
-Domnic -
Adobe Edge Animate CC 2014.1 is totally not working. It stop working after 5min. Sometimes is stops the operating system. On on mac OS X Yosemite. macbook pro i7 2013.
I reinstalled it not helping.
Message was edited by: Daniel BoguszewskiUPDATE
i have ulpaded 2 animation ( one normal and one Responsive ) in 2 different server here the link
www.eclipseadv.com/maliRP/maliRP.html
Untitled
via SAFARI or CHROME on MAC all OK
but via IPAD ( SAFARI, CHROME and MERCURY) i didn't see the video, just the animation of the BUTTON and the link if i click on it (not in Mercury), like in the content viewer. -
The App Nike Running is not working well with my Ipod touch 5 th generation It always gives me the wrong distance and velocity. Is it normal? What could I do?
Are you using the shoe sensor?
Try:
http://www.apple.com/support/nikeplus/troubleshooting/ -
These add up correctly:
Two formulas Adding Up
WhilePrintingRecords;
Global NumberVar GrossCededEarn ;
if {@ThisLineNo} = "112" OR {@ThisLineNo} = "122" then
GrossCededEarn := GrossCededEarn + {@SECTION-SIGNED-AMOUNT};
WhilePrintingRecords;
Global NumberVar GrossPremEarn ;
if {@ThisLineNo} = "110" OR {@ThisLineNo} = "120" then
GrossPremEarn := GrossPremEarn + {@SECTION-SIGNED-AMOUNT};
Two formulas displaying:
global numbervar GrossPremEarn;
if {@Breaks} = "A2" then GrossPremEarn
global numbervar GrossCededEarn;
if {@Breaks} = "A2" then GrossCededEarn
But this does not work:
WhilePrintingRecords;
Global NumberVar NetAcqDAC ;
if ({@ThisLineNo} >= "150" and {@ThisLineNo} <= "151") then
NetAcqDAC := NetAcqDAC + {@SECTION-SIGNED-AMOUNT} ;
WhilePrintingRecords;
Global NumberVar NetAcqDAC2 ;
if ({@ThisLineNo} >= "160" and {@ThisLineNo} <= "162") then
NetAcqDAC2 := NetAcqDAC2 + {@SECTION-SIGNED-AMOUNT};
WhilePrintingRecords;
Global NumberVar NetAcqDAC3 ;
if {@ThisLineNo} = "190" then
NetAcqDAC3 := NetAcqDAC3 + {@SECTION-SIGNED-AMOUNT};
global numbervar NetAcqDac;
global numbervar NetAcqDac2;
global numbervar NetAcqDac3;
if {@Breaks} = "B5" then totext(NetAcqDac) + " " + totext(NetAcqDac2)+ " " + totext(NetAcqDac3)
The only sum that works here is te NetAcqDAC3 which happens to be the line right before I display these totals.
The other two show totals but they are completely wrong. When I look in the detail where I placed them they all add up correctly but when I display them they are wrong.
I also created a running total which I noticed it resets for each {@ThisLineNo} but I have it set to never reset. Also I have this running total evaluating with this formula:
({@ThisLineNo} >= "150" and {@ThisLineNo} <= "190")
I donu2019t understand why it works for the first set above but it wonu2019t for these.
Help Please!
JC
Edited by: J S on Mar 12, 2009 12:43 PMHi J.S,
Common thing in below two formulas is checking a text field with >= otherwise there is no problem. Try the following :
WhilePrintingRecords;
Global NumberVar NetAcqDAC ;
if (ToNumber({@ThisLineNo}) >= 150 and Tonumber({@ThisLineNo}) <= 151) then
NetAcqDAC := NetAcqDAC + {@SECTION-SIGNED-AMOUNT} ;
WhilePrintingRecords;
Global NumberVar NetAcqDAC2 ;
if (Tonumber({@ThisLineNo}) >= 160 and Tonumber({@ThisLineNo}) <= 162) then
NetAcqDAC2 := NetAcqDAC2 + {@SECTION-SIGNED-AMOUNT};
Thanks,
Sastry -
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. -
Grand Total Not working on Materialized view based table ??
Hi all,
I have a complex report report by using sum and decode function. I precalculated my requirment in database and then create a materialized view based on my sql statement. I import this view in physical and BM model and its results very fine and efficient. But the problem create when I implement Grand Total on my report in table view it did'nt work means (Grand Total is not working on this MV based table) Any idea why ??
any reply would by higly appriciated.
RegardsHi Zishan,
Check the Aggregation Rule and set it to sum in the table view.
That is go to the "edit formula" tab of the column for which you want grand total and set that to sum.
Hope this will help.
Thanks
Ashok -
Running samples not working...
I could run these samples before, but now they do not work with the following error. Any idea why this is happening? I solved it once by deleting files in the temp directory, but now that does not work. Any ideas would be appreciated.
Thanks,
Ray
MY CONFIGURATION INFO
DB => 9.0.1.3
DB Platform => Solaris 2.6
DB SID => ifsdb
2nd Tier Platform => Windows 2000 Server
IFS Version => 9.0.1
D:\ora901client\9ifs\samplecode>java oracle/ifs/examples/api/UserSample system manager IfsDefault ifssys
UserSample starting
Unable to start service:
java.lang.NoSuchFieldError:java.lang.NoSuchFieldError: OCIEnvHandle
java.lang.NoSuchFieldError: OCIEnvHandle
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.ifs.server.LibraryConnection.<init>(LibraryConnection.java:245
at oracle.ifs.server.ConnectionPool.constructLibraryConnection(Connectio
nPool.java:712)
at oracle.ifs.server.ConnectionPool.createLibraryConnection(ConnectionPo
ol.java:673)
at oracle.ifs.server.ConnectionPool.<init>(ConnectionPool.java:311)
at oracle.ifs.server.S_LibraryService.resetConnectionPools(S_LibraryServ
ice.java:3204)
at oracle.ifs.server.S_LibraryService.<init>(S_LibraryService.java:1051)
at oracle.ifs.server.S_LibraryService.startService(S_LibraryService.java
:1408)
at oracle.ifs.beans.LibraryService.startService(LibraryService.java:255)
at oracle.ifs.beans.LibraryService.startService(LibraryService.java:303)
at oracle.ifs.examples.api.BaseSample.startService(BaseSample.java:95)
at oracle.ifs.examples.api.UserSample.run(UserSample.java:62)
at oracle.ifs.examples.api.UserSample.main(UserSample.java:43)
UserSample could not establish a session; exitingLooks like your JDBC is not ok on the middle tier machine. You need to be able
to connect using JDBC from the middle tier to the database. -
Subtotal / Grand total not working
I am new to OBIEE & I could not get a simple 'Total By' or 'Grand Total' in Answers, Table view. The default aggregation rule in Administrator is selected as 'Sum'. When I click on the 'E' summation icon, nothing happens. What am I missing?
Thanks,
Dinesh.OK. I figured out what was wrong. I did not put the logical schema in a star schema approach (dimensions & facts). Once I did that, the sub-totals & grand totals started working.
But I am greatly disappointed by this limitation. I just have a copy of my transactional database & I do not want to do star schema data modelling so that I can quickly start reporting. Is there any work-around for this?
Thanks,
Dinesh. -
My mbp with retina's camera is totally not working
My camera is not working at all. I already tried to reinstall mac os x mountain and even restore my mac to factory setting. and i restarted many times but it still doesnt work. Im confused.
Take it to Apple. The camera must not be installed right. There must be a loose wire. If your positive that it won't work take it to them. Its considered as a defected product!
-
I created a topic on here earlier about not being able to run javac on some of my java files, but it turns out I cant use java at all. I have many programs I have made, and before the weekend I have been able to run them, and now whenever I try to run a java program, I get the error:
"Exception in thread "main" java.lang.NoClassDefFoundError: <class>"
I thought it was something to do with my firewall blocking access for the java.exe, because I recently installed a new firewall program, but I have reverted back to my old one and it still doesnt work. The only other program I have recently installed is itunes, I doubt it would be that stopping it functioning. I have tried reinstalling the JDK many times, and deleting all files from Program Files and from the registry and still it doesnt work when I reinstall it. If anyone can help me it would be much appreciated.
I am using JDK 5.0 update 6 on Windows XP, and using the command prompt to run java."Exception in thread "main" java.lang.NoClassDefFoundError: <class>"If you have really that class on your machine, then it is simply a classpath issue.
If your class is stored in your current working directory, try:
javac -cp . MyApp.java
java -cp . MyApp
If you use IDE, cousult the documentation. -
I am trying to create a calculation by evaluating a set of records and including only those that meet the criteria in the total. The calculation seems to work correctly on the individual records, but the total does not... it seems to be doubling the result. Here's the calculation:
SUM(CASE WHEN ( Tx Period."Tx Period Year" = '2007' AND Activity Composite fact.Activity Date <= TO_DATE('07-MAR-2007') ) THEN Activity Composite fact.Activity Amount ELSE 0 END)
Any help appreciatedHi,
Are there any Page Items on the report?
Is the report output displayed for all the records? Also, check if "Hide duplicate rows" is checked.
Thanks. -
[SOLVED] vsftpd on Local Mirror, running but not working
I'm building a Local Mirror on a vm (vbox) with bridged adapter and fix-ip by following this wiki.
http://wiki.archlinux.org/index.php/Loc … cal_mirror
After the painful rsync and those setup, I tried pacman -Syu from another Arch vm (no firewall). I received the following error.
:: Synchronizing package databases...
error: failed retrieving file 'core.db.tar.gz' from 192.168.100.100 : Service not available, closing control connection
I've tried by nmap on the hosting PC and find that the vsftpd should be running.
Starting Nmap 4.62 ( http://nmap.org ) at 2010-08-27 01:03 HKT
Interesting ports on 192.168.100.100:
Not shown: 1714 closed ports
PORT STATE SERVICE
21/tcp open ftp
MAC Address: 08:00:27:76:33:1C (Cadmus Computer Systems)
Nmap done: 1 IP address (1 host up) scanned in 1.318 seconds
In the wiki, it suggests to use "ftp" to replace "mirror" for ftp_username & nopriv_user. I tried both.
I also find that there is no "archlinux" under my /home/mirror/files as "suggested" by the following statement in vsftpd.conf
# Chroot directory for anonymous user
anon_root=/home/mirror/files/archlinux
I tried both (1) amend the vsftpd.conf to remove the "archlinux", and (2) manually add that directory with owner/group=mirror.
Meanwhile, I only find under /home/mirror/files 6 items - community core extra community.lastsync core.lastsync extra.lastsync. Have I completed the rsync successfully? Or, something is missing. Is the directory structure correct?
Is the sample vsftpd.conf in the Local Mirror wiki updated? I've cross reference it with the vsftpd wiki but I'm not knowledgable enough to find things useful.
What else should I check?
I love ArchLinux so much that I really hope that it can work.
Please help.
Thanks.
Last edited by dboat (2010-08-27 15:38:14)I have tried couple of Linux distro to learn Linux/Network. I like ArchLinux's "simple" concept, light weight, updated packages, nice document and fast bootup/shutdown. I have installed over ten times ArchLinux in different virtualmachines and netbook in the past week. I will keep some, delete some and create more. I don't have a fast internet connection and that's why I would like to set up my local mirror. I am a newbie here, so please feel free to let me know if I am taking too much (bandwidth) from the community, and it is not encouraged for my case. And sorry if I have already created any trouble.
Well, back to my problem.
1. After the rsync, including everything, the / now occupies 14G harddisk space. Is it a normal size for a local mirror?
2. I have inserted "Server = file:///home/mirror/files/$repo/os/i686" as the first line in its /etc/pacman.d/mirrorlist
pacman -Syy looks fine.
pacman -Syu gives a list of warning (xxx: local is newer than core), end with "there is nothing to do"
pacman -S mplayer starts installtion normally, but need mirrors on internet cause a large portion of software is missing/inaccessible on my local mirror.
3. I have tried to login by FileZilla from an Ubuntu vm, and receive this error message (on FileZilla)
Status: Connecting to 192.168.100.100:21...
Status: Connection established, waiting for welcome message...
Response: 421 Service not available.
Error: Could not connect to server
Seems I have issues on both the mirror and the vsftpd. I prefer to resolve the vsftpd problem first, but all suggestion/comment are very welcome.
Lastly, did I post my question in a wrong place? If yes, please let me know. -
SAPOsCol running but not working (shared memory not available)
Dear Forum,
We have just set new passwords for SAP AD users (incl SAPService<SID> and <SID>adm), after this restarted SAP instances and servers / clusters). Everything came up well and all services, incl SAPOsCol started up automatically with the new passwords.
Everything works fine - only this morning i wanted to have a look in ST06 and the program tells me "SAPOSCOL not running? (shared memory not available).
The service is running tho, would a restart of the service do any difference, and is there any possibility that a restart of the service on a live and running system would force a system restart? (i couldnt think of any, but I hate restarting services on a live running production system).
Would it be an option to stop/start the collector from ST06?
Thanks in advance,
Kind regards,
SorenHello Kaushal,
Thank you for your answer!
I tried to start and stop/start the service from ST06, but it doesnt work. Here is a content og the log - any ideas how i could start the collector without booting the server?
HWO description
SAPOSCOL version COLL 20.95 701 - 20.64 NT 07/10/17, 64 bit, multithreaded, Non-Unicode
compiled at Feb 24 2009
systemid 562 (PC with Windows NT)
relno 7010
patch text COLL 20.95 701 - 20.64 NT 07/10/17
patchno 32
intno 20020600
running on L5183N01 Windows NT 6.0 6002 Service Pack 2 16x AMD64 Level 6 (Mod 26 Step 5)
PATCHES
DATE CHANGELIST PLATFORM PATCHTEXT
20081211 1032251 ALL Option -w support. Removed SizeOfRecord warning rt 130.
20090114 1036522 UNIX Log file permissions: 664.
20090203 1041526 UNIX Add. single instance check.
20090210 1042962 ALL Continue after EWA HW XML generation failure.
09:46:39 12.04.2010 LOG: Profile : no profile used
09:46:39 12.04.2010 LOG: Saposcol Version : [COLL 20.95 701 - 20.64 NT 07/10/17]
09:46:39 12.04.2010 LOG: Working directory : C:\usr\sap\PRFCLOG
09:46:39 12.04.2010 LOG: Allocate Counter Buffer [10000 Bytes]
09:46:39 12.04.2010 LOG: Allocate Instance Buffer [10000 Bytes]
09:46:40 12.04.2010 LOG: Shared Memory Size: 118220.
09:46:40 12.04.2010 LOG: Connected to existing shared memory.
09:46:40 12.04.2010 LOG: MaxRecords = 1037 <> RecordCnt + Dta_offset = 1051 + 61
09:46:55 12.04.2010 WARNING: WaitFree: could not set new shared memory status after 15 sec
09:46:55 12.04.2010 WARNING: Cannot create Shared Memory
thanks!
Soren
Edited by: Soeren Friis Pedersen on Apr 12, 2010 9:49 AM -
Increment date paramters each run is not working
hi all,
i have a schedualed concurrent request that take a date prameter, i schedule the request to run daily with the option "increment date paramters each run" but it runs daily without incremeting the date what could be worng
fadiYou mean it was working earlier ? yes and still for all old request but not the new ones.
Do you by any chance use a sql to define the default parameter (like select sysdate from dual) ? yes i do i user select sysdate-1 from dual because i need it to run to the preivose date
Try to use paramter type = date, and default = Current Date, and check the increment date run. will try but i dont need the current data, i need current date -1
thanks dgood
fadi
Maybe you are looking for
-
Tips on avoiding hard coded paths and make a java app platform independent
HI all, I would like to gather some tips on how to avoid hard coded file paths, which are plenty in the application I work on and which I inherited from previous programmers. Also, when deploying to the production server, my app goes from a Windows p
-
Sending a hyperlink through mail
HI all, I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_SEND_API1. In that i need to send a link also. When the user clicks on that link it should go to a webpage. Example : Mail format. Hi, Please <b>click her
-
Where can i find Main work center field value in il03 transaction ??
Hi experts, Where can i find <b>Main work center</b> field value in il03 transaction. Iam looking for the table from where that value will be filled. thanks Suresh
-
When viewing the color blue on my iPad it appears greenhe correct color appears on my computer screen. Can this be resolved?
-
How to increase the mail attachement length from 255 chanracters ?
Dear All , I am sending a mail to my vendor as attachement . I have developed one report which caontain 90 coulums now i am taking my final internal table and sending it as a Mail but not able to send whole as an attachement Bcoz tht 90 columns lengt