Getting running total formula result at the beginning of the report

Hello All,
I am having an inquiry that if I can get a grand total in the report footer to the report header.
The grand total is not a direct sum.  I am using three formulas
the first formula:
@reset Group Header
whileprintingrecords;
numbervar sumpct4;
if not inrepeatedgroupheader then
sumpct4 := 0;
the second formula: Details section
whileprintingrecords;
numbervar sumpct4 := sumpct4 + {@Total_Market};   // {@Total_Market}; =  Amount+ Interest
numbervar grtotal4 := grtotal4 + {@Total_Market};
Group Footer
whileprintingrecords;
numbervar sumpct4;
Report Footer
whileprintingrecords;
numbervar grtotal4;
All that I need is to show the total which is in the report footer at the top of the page where I am having a summary.
So, can you please help me.
Thanks
Edited by: maas maas on Sep 8, 2010 12:48 PM

Hello my friend,
I want this to be controlled in crystal.
Is there is a way to get the grand total by using multiple formulas or any other way?
Here is the structure of my report:
Group Header 1: CCY
Group Header 2:Type
@reset Group Header
whileprintingrecords;
numbervar sumpct4;
if not inrepeatedgroupheader then
sumpct4 := 0;
Group Header 3A: Deal No
Group Header 3B: Deal No (subreport to get the {@amount} for each deal)
I will pass the end_date from the main report to subreport and I will get the sum(amount) for each deal between date (1-1-2008) to end_date. The sum will be as a shared variable to the {@amount} formual in the main report.
Details:
Deal No, {@amount}, {@Price}, {@market}, {@Total_Market}
{@Price}: if {table.price} = 0 then
100
else {table.price}
{@market}: if Type <> "DEP" then
({@amount}*{@Price})/100
else
{@amount}
{@Total_Market}:{@market}+ {@Price}
Running formula to get Total_market: Details section
whileprintingrecords;
numbervar sumpct4 := sumpct4 + {@Total_Market};
numbervar grtotal4 := grtotal4 + {@Total_Market};
Group Footer 3B: Deal No
Group Footer 3A: Deal No
Group Footer 2:Type
In this group I am placing a running total formula:
whileprintingrecords;
numbervar sumpct4;
Group Footer 1: CCY
Report Footer:
@grand_Total
whileprintingrecords;
numbervar grtotal4;
Now, i want this @grand_total formula result to be shown in Group Header 1: CCY.
I tried to insert a subreport at the beginning which it is a copy of the main report, but I did not get the coorec t result because I am getting the {@amount} from a subreport and in crystal I can't insert a subreport in an existing subreport.

Similar Messages

  • Running Totals, formula statement works one way, not the other

    Here is the problem in a nutshell...
    I am designing a report where I am using 2 running totals based on whether a SQL Stored Proc dataset field (text) is Null or Not Null...  So I design the 2 running totals and put this code in each "Evaluate"
    IsNull({usp_rpt_RemediationData;1.Action})
    - and -
    NOT IsNull({usp_rpt_RemediationData;1.Action})
    The FIRST one works.  The SECOND one does not - that is, it does not add a count for it.
    In other words, I am just cycling through a table and counting 1 field, checking whether its Null, or not.
    Why doesnt this rather simple and straight forward thing work!!!!????
    Any help would be most appreciated.

    The statement...
    NOT IsNull({usp_rpt_RemediationData;1.Action})
    DID NOT work when used as part of a running total - even adding the check for blank instead of just null (though the field is truly null).
    However, using the EXACT same statement in a formula written for running totals - it does work...?  Go figure...  I cant explain it.
    But thanks for the help!

  • How to create a running total formula for different calendar years

    Hello everyone,
    I am looking for some help in creating a running total formula for different calendar years in Oracle. This is what I currently have organized in the crosstab report: vertically I have the cities from our database organized, then horizontially have the following information for each city:
    2006 /2007 /2008
    Amount /Amount Spent /Unspent Amount Amount Recieved/Amount Spent /Unspent Amount Amount Recieved/Amount Spent/Unspent Amount
    Recieved
    I am trying to create a formula that will specify each calendar year. For example, I'd like to have a formula in 2007 which would total the: 2007= {2006 unspent amount + the unspent amount in 2007} and same for 2008= {2007 unspent amount + the unspent amount in 2008}. I hope this is clear, I have simplified the report into a basic interpretation of what i've been trying to accomplish.
    Would anybody know if this is possible and how to approach this?
    Really appreciate it! Thanks.
    Alex

    Hi,
    you can try and define a running total as a calculation in the crosstab as:
    sum(Unspent Amount) over (partition by city order by year)
    i find the crosstab format comfusing sometime since the aggregation is auto applied.
    I would start with a flat table and then "duplicate is as a cross tab"
    for your running total you can sort the data by the city,year and get it to 3 lines for each city, for example:
    city year Unspent Amount all other amount...
    X 2007 10
    X 2008 20
    X 2009 30
    Y 2007 5
    Y 2008 15
    Y 2009 25
    then you can use a funtion to calculate the amount :
    sum(Unspent Amount) over (partition by city order by year)
    this is the sql i used just to check it:
    SELECT city,year,"Unspent Amount"
    ,SUM("Unspent Amount") over (PARTITION BY city ORDER BY YEAR)
    FROM (
    SELECT 'X' city, 2007 YEAR, 10 "Unspent Amount" FROM dual UNION ALL
    SELECT 'X', 2008 ,20 FROM dual UNION ALL
    SELECT 'X', 2009 , 30 FROM dual UNION ALL
    SELECT 'Y', 2007 , 5 FROM dual UNION ALL
    SELECT 'Y', 2008 , 15 FROM dual UNION ALL
    SELECT 'Y', 2009 , 25 FROM dual
    Tamir

  • Extra Blank Line gets added at the Beginning of the file by File Adapter...

    Hello All,
    I have created an RFC to File Adapter scenario in PI 7,1 and I am using Content Conversion in the File Adapter to convert the payload structure to flat text file. The input Structure is simple as follows:
    <File>
    <FName>some file name</Fname>
    <Record>
      <Data>
          <Line>Text Lines</Line>
    </Date>
    </Record>
    </File>
    while using the following Content Conversion Parameters: While I have defined "Record" as Structure.
    Record.addHeaderLine   = 0
    Record.fieldSeparator      = 'nl'
    Record.endSeparator      = 'nl'
    Here everything is working fine except that the text file getting generated has a blank line at the beginning. I was thinking that by adding "Record.addHeaderLine   = 0" parameter, no header line will be added to the file but this seems to be not working. I tried to include the top element "File" with the same parameters and different combinations but was not able to achieve the result and it stopped the file creation altogether.
    So, I'll appreciate if anyone can suggest something to get rid of the this blank line at the beginning of the file.
    Regards,
    Athar

    Extra blank line is actually provided for the FNAME node, but not displayed because of it has different structure with Record node.
    Change the structure for FNAME to :
    <FName>
    <Data>
    <Line>some file name</Line>
    </Data
    </Fname>
    this way "some file name" will be dispalyed in the text file at the first line of file. To remove it use this trick, define the following values in Content Conversion Parameters:
    in the Recordset Structure : FName,Record
    FName.fieldFixedLengths     = 0
    FName.fixedLengthTooShortHandling =     Cut
    FNamee.fieldSeparator = '0'
    FName.endSeparator =     '0'
    Record.fieldSeparator = 'nl'
    Record.endSeparator = 'nl'
    Rgds,
    Triana

  • 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 hintsOskar  

    I 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.

  • How do I get rid of dead time at the beginning of the song without messing with the timing of staggered entrances of various tracks/instrument?

    How do I get rid of dead time at the beginning of the song without messing with the timing of staggered entrances of various tracks/instrument?

    marykaymaas wrote:
    How do I get rid of dead time at the beginning of the song without messing with the timing of staggered entrances of various tracks/instrument?
    either Select All and drag to the left (turn on the Lock Automation menuItem if you have any automation curves)
    or
    use the Cycle Region to export the exact length you wish:
    http://www.bulletsandbones.com/GB/GBFAQ.html#exportexactlength
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How do I get the playhead to move to the beginning of the cycle area when selected instead of bar 1 after hitting enter?

    How do I get the playhead to move to the beginning of the cycle area when selected instead of bar 1 after hitting enter?

    Grateful pirate wrote:
    Thanks but I think it's more of a setting thing.
    Worked for years in 9 and know my the key commands. Just takes up  lot of extra time. I know there must be a solution just can't find it myself.
    Thanks again.
    Oh, I see…….when I want something like this to happen I would just engage the >Go To Start<  command (0 on the numeric keyboard in my case) and the play head will position at the beginning of a cycle area (if one is active of course)!
    Hope this helps a bit……..

  • I get about 1 minute silence at the beginning of the file when I bounce it.

    I get about 1 minute silence at the beginning of the file when I bounce it.

    Does this overwrite the music you have recorded? Or does it just insert 1 minute of silence and then play everything starting at measure 1?
    Before you go to bounce the file 1) make sure the cycle is turned off in the transport window and 2) make sure no regions are selected.  When you go to bounce it, check what the start and end times are.
    Make sure the start time is 1-1-1-1.
    Hope this helps!

  • HT1510 Is there a way to get the IPod Shuffle 3rd generation to go to the beginning of the playlist/music so I can go on the "Play In Order" mode and have it start from the beginning.

    Is there a way to get the IPod Shuffle 3rd generation to go to the beginning of the playlist/music so I can go on the "Play In Order" mode and have it start from the beginning.

    gakansas wrote:
    It has some songs I would like to keep
    There is no legal way to do this-  You would need to be using the same AppleID (account)
    As far as deleting the songs, in a situation like this, you should restore the iPod which will delete the songs as well as allow you to sync your own music.
    For instructions on how to delete/add songs  it's best to check the manual:
    http://support.apple.com/manuals/#ipod
    As far as restoring, you didn't mention what model you are using but just choose your model from here (they have step by step instructions):
    http://www.apple.com/support/ipod/

  • I Can't get the motion page to play at the beginning of the movie, it old shows up at the end of the movie, Help!!

    Does someone know how to get the motion page in I-dvd to play at the beginning of the movie instead of at the end, which is what is happening with my situation??

    Are you referring to the motion menu?  Check to see if you have the project set to autoplay when you insert the disk in a player.  That would bypass the menu and would drop you back into the menu at the end of the show.
    OT

  • When I use the scissors tool to create a segment of a track, select the segment and bounce it, about 15-20 seconds of silence is added to the beginning of the resulting segment. What causes this?

    When I use the scissors tool to create a segment of a track, select the segment and bounce it, about 15-20 seconds of silence is added to the beginning of the bounce. What causes this?

    Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
    Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want. 
    Doing a cross  join between my original resultset that had two dates:
    08/27/2010
    10/24/2011
    and a calendar table that has 24 rows (each month for a two year period)
    my new resultset looks like this:
    I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
    You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
    the Months Assigned value must be greater than or equal to the date assigned value.
    Any advice would be appreciated.

  • Add records in the beginning of the table

    Hi,
    Is that possible to add or append the records in the beginning of the table.
    For example,
       CREATE TABLE app_test (n NUMBER, n1 VARCHAR2(200));
       and inserting new records
      INSERT INTO app_test
         VALUES (1, 'test');
      INSERT INTO app_test
         VALUES (2, 'test');
      INSERT INTO app_test
         VALUES (3, 'test');
      select * from app_test;
    N     N1
    1     test
    2     test
    3     test
      Is that possible to add the records like below. Appending newly inserted rows in the beginning of the table.
    N     N1
    3     test
    2     test
    1     test
      Thanks
    Radha K

    hI,
    Radha K wrote:
    To get achieve sorting order, i have done the following, but the when i
    query the record, its not showing the order which i created in the index.
    CREATE TABLE iot_app_test (
    n NUMBER,
    n1 VARCHAR2(10),
    n2 TIMESTAMP);
    CREATE INDEX
    iot_app_test_indx
    ON
    iot_app_test
    SUBSTR(n2,1,9) DESC, SUBSTR(n2,11) ASC);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE + 1);
    INSERT INTO iot_app_test
    VALUES (1, 'test', SYSDATE + 2);
    INSERT INTO iot_app_test
    VALUES (2, 'test', SYSDATE + 2);
    INSERT INTO iot_app_test
    VALUES (3, 'test', SYSDATE + 2);
    SELECT *
    FROM iot_app_test
    WHERE n2 <> SYSDATE + 3
    N     N1     N2
    1     test     4/28/2010 1:59:26.000000 PM
    2     test     4/28/2010 1:59:30.000000 PM
    3     test     4/28/2010 1:59:33.000000 PM
    1     test     4/29/2010 1:59:38.000000 PM
    2     test     4/29/2010 1:59:41.000000 PM
    3     test     4/29/2010 1:59:44.000000 PM
    1     test     4/30/2010 1:59:48.000000 PM
    2     test     4/30/2010 1:59:51.000000 PM
    3     test     4/30/2010 1:59:53.000000 PM
    The query doesn't have an ORDER BY clause, so the results could be in any order. In fact, you can run the exact same query with the exact same data seconds apart, and get a different order every time.
    The index doesn't change that. Someone above mentioned an Index Organized Table (which is not merely a table with an index), where you can control the order in which rows are stored (as if you wanted to). There is still no guarantee that, absent an ORDER BY clause, output will be in any particular order.
    But when i use the same function in order by clause, its showing the correct result.To repeat what others have said already, the only way to get output in any particular order is to use an ORDER BY clause.
    (CONNECT BY queries are the only exception of which I know. There is a partial ordering in CONNECT BY output, even if you don't use ORDER BY or ORDER SUBLINGS BY.)
    >
    SELECT   *
    FROM iot_app_test
    ORDER BY SUBSTR (n2, 1, 9) DESC, SUBSTR (n2, 11) ASC;
    N     N1     N2
    1     test     4/30/2010 1:59:48.000000 PM
    2     test     4/30/2010 1:59:51.000000 PM
    3     test     4/30/2010 1:59:53.000000 PM
    1     test     4/29/2010 1:59:38.000000 PM
    2     test     4/29/2010 1:59:41.000000 PM
    3     test     4/29/2010 1:59:44.000000 PM
    1     test     4/28/2010 1:59:26.000000 PM
    2     test     4/28/2010 1:59:30.000000 PM
    3     test     4/28/2010 1:59:33.000000 PMCan anyone tell me what's wrong with this.Nothing is wrong.
    You're getting the correct output, in the correct order. Why do you think anything is wrong?

  • Irc account keeps disconnecting cannot use IM what is nick at the beginning of the name ..can i use another name ? thank you

    hello i am trying to set up instant messaging ....the account keeeps disconnecting after a few seconds and i cannot make it work
    it keeps saying nick ... what is nick at the beginning of the name ..can i use another name ?
    if i use mozilla for IRC what is the server name ?
    what other details do i need to type in ?
    Thunderbird is running on a single home PC which only has Open Suse 13.1 x64 linux on it ( no Windows )
    thank you

    'nick' is your nickname which you entered when you set up the IRC chat. You can register your nickname by entering "/msg nickserv register <password> <email address>"
    Then when you start next time enter "/msg nickserv identify <password>"
    You can get a list of nickserv commands by entering "/msg nickserv help"

  • When i open a new tab i want the cursor to be at the beginning of the url (it was until this latest update, now the cursor is at the end of the url)

    I have just taken the latest update to 22.0 from the last version.
    In the past when i opened up a new tab the cursor would jump to the beginning of the URL and i could start typing. Now the cursor goes to the back of the URL and i have to double click the URL to type in a new one.
    Let me try to be as clear as i can. I have had firebox set for long time so when i open a new tab google.com comes up, and google is also my home page.
    I have not installed any options for a long time either. And nothing that has to do with tabs.
    What i remember is as i opened a new tab the URL of it would turn blue and i could start typing in a new URL. Now when i open a new tab i see google.com come up in blue, then the url turns to https://www.google.com/ and the blue goes away and the cursor is at the end of the URL. I now have to double click the URL to type.

    I switched to the "about blank" and then use my home icon to get to Google.com
    It is not quit as good as it was but usable.
    I think you should add two new check boxes in options under "tabs"
    1 - When opening any new tab, put the focus of the cursor on the URL.
    2 - When opening any new tab, put the focus of the cursor on the search box.
    This will take care of the majority of people.

  • Downloaded songs don't start at the beginning of the song, why?

    the songs i bought from itunes don't start at the beginning of the song,  it's just the preview clip.

    Been having the same problems myself. And I don't know about you but sometimes it'll take a while to get it to actually play the first song.

Maybe you are looking for

  • Problem with java look and feel

    Hi! This is my first time posting here. Do apologize me if I am not familiar with the regulations here. Thanks! Currently, I am developing a project using NetBeans IDE. It is using RMI, and some basic UI. I am facing the following error when I tried

  • How to Edit a PDF File in Adobe Reader

    I used to create PDF files from the blog [link removed] But i would like to delete the links in the sidebar and other un wanted content from the PDF file but i cant do it in Adobe Reader. How can i delete it. Is there any option. Do i have to install

  • Error in Essbase 11.1.1.3 Installation.

    Hi Gurus, I have sucessfully installed the Essbase 11.1.1.3 & when i am trying to do the shared services configuration i am getting an error like " Login failed for user dbadmin. User is not associated with a trusted sql server connection". I have in

  • How can I view attachments in events using the native iOS 5 calendar app?

    I thought I read that this will be possible with iOS 5, but I could not work it out so far. Please help!

  • Save .PDF back to SharePoint, Acrobat is renaming files

    My problem is that Acrobat is renaming and also creating a new PDF file with both a random filename, when I save a .PDF file witch is checked out in SharePoint. I'm trying to find a way around the problem that we cannot save a .PDF file back to Share