Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Asia Pacific

    Unanswered: Store value to variable?

    I got a report which calculates a running total of a field where put into a report footer. Can i get this field and display that same value to details section of stored it so i can use it again. eg.

    Header Field#1 Field#2
    Detail 1(amount) 6(RT_Amt)
    Detail 2(amount) 6(RT_Amt)
    Detail 3(amount) 6(RT_Amt)
    Footer RTotal= 6(RT_Amt)

    If theres any suggestion it would be deeply appreciated, thanks!

  2. #2
    Join Date
    Jan 2004
    Jersey, UK
    I know this is possible and have an idea of how it's done but not the answer.

    You need to create a variable and then a formula that refers to that variable. The variable will store the value and not change (evaluate) enabling you to use the same figure as your running total.

    Do some searches/research on variables. Try keywords like whileprintingrecords, whilereadingrecords, ';', variable, local, shared.

    Sorry I can't be more specific but I'm only learning this stuff myself.

    Regards - Andy

  3. #3
    Join Date
    Nov 2004

    Save data in a variable

    Create a global variable within your formula i.e.: Global NumberVar Total;
    Store your total in that variable. Then, create another formula and put this formula in your detail section. The first line of code should be

    Global NumberVar Total;
    NumberVar DetailTotal;
    DetailTotal :=Total;

    That should do it for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts