how to save the value of column from the first record to a global variable and use it later?
how to save the value of column from the first record to a global variable and use it later?
(OP)
I need to save a column value from the first row of a command object to a variable so I can use it at the bottom of the report. I sort of new in CR XI and I've spent a lot of time searching, maybe someone here can help me
RE: how to save the value of column from the first record to a global variable and use it later?
Depending upon your answered, the following might work:
Whileprintingrecords;
Numbervar x;
If {table.date}=minimum({table.date}) then
X := {table.quantity};
Then just reference in the report footer:
Whileprintingrecords;
Numbervar x;
You could alternatively set up a variable to count the records, like this:
Whileprintingrecords;
Numbervar cnt := cnt + 1;
Numbervar x;
If cnt=1 then
X := {table.quantity;
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
customer-code,address, qty,amount.
it happens that sometimes the last rows can be returned with Nulls, but I need to print the address in the footer. since all the rows qould be for the same customer-code and address, I need to save the first or lastnon-null address to a variable and print it in the footer.
in your example where do i put those formulas? do I create a formula field?
hope you can help me further
MP
RE: how to save the value of column from the first record to a global variable and use it later?
Do you have any groups?
What if there are more than one customer on the page? What would you want to happen?
What footer section are you referring to? A group footer? A page footer? Report footer?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
-No Groups, this is like an invoice
so in the the detail section, it prints the items sold for a customer's invoice
I referring to a Page Footer (the II have to print the address , but since the last row is nulls I need to save the last value (or the firs as they wiil be for the same customer address)
MP
RE: how to save the value of column from the first record to a global variable and use it later?
Whileprintingrecords;
Stringvar x := “”; //replace these iPad quotes with your own, please!
If not isnull({command.address}} and
Trim({command.address}) <> “” then //replace these quotes
x := {command.address};
Put this formula in the page footer:
Whileprintingrecords;
Stringvar x;
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
MP
RE: how to save the value of column from the first record to a global variable and use it later?
Whileprintingrecords;
Stringvar usps:= "";
If not isnull({Command.MailAddr}) and
Trim({command.MailAddr}) <> "" then
usps:={command.MailAddr};
RE: how to save the value of column from the first record to a global variable and use it later?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
pleae advise
MP
RE: how to save the value of column from the first record to a global variable and use it later?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
----------------------
Put this formula in the page footer:
Whileprintingrecords;
Stringvar x;
- do you mean to create another formula field with that formula and insert it into the footer?
let me know
thanks!
MP
RE: how to save the value of column from the first record to a global variable and use it later?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
MP
RE: how to save the value of column from the first record to a global variable and use it later?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
thanks in advance
MP
RE: how to save the value of column from the first record to a global variable and use it later?
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
Sorry for misunderstanding earlier.
-LB
RE: how to save the value of column from the first record to a global variable and use it later?
thx
MP