Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placeholder Column

Status
Not open for further replies.

mrkamran

Programmer
Jan 1, 2003
21
PK
Hi,
I have 2 groups in my report(master and detail group), i place a plcaceholder column in my master group. i give it value with a formula, which is also place in master group.
i use placeholder column in detail group, i can take its value but when i assign value to it, it will give error that "it must use in same group". My problem is that i want to init a variable outside the detail group and in detail group i want to increment its value in a formula, place in detail section. what should i do?
thanks!

 
To pass a value you may use some variable global for the report. The variable must be declared in the spec of the procedure that you may create in the report's program units section just for declaring the variable.
 
How can i use global variable where should i declare it.
I want to assign a value this global variable in master section's formula and further it will use in detail section.
kindly help me about it...
 
1. Highlight the Program Units node in Object Navigator
2. Click the Create button on the left-side toolbar.
3. Give name: P , and select "Package Spec"
4. Type the following in the window that opens
Code:
PACKAGE p IS
  v number;
END;
5. In the main group create formula CF_1:
Code:
function CF_1Formula return Number is
begin
  p.v := [b]your_value_here[/b];
  return 1;
end;
6. Now you may use p.v in any other formula as needed
 
THANKS!
i got my answer. Now there is another problem, i initialize p.v value in master section and i can use this value in detail section but problem is that when i change its value in detail section then on next record its value again initilize as in master section whereas i want that it continue to next calculated value in detail section. I give u example of my work, i initialize p.v value in master section formula, now in detail section formula i use
p.v := p.v + 1; i.e

this is master section fileds...
.p.v := 1
.

this is detail section

sr#---ID---Name------Balance
1----101---kamran----45000
2
3
4

but sr# that is p.v show 2 on every row out of 1, 2, 3, 4...

i want to to use only variable here nor placeholder or summery column, then??


 
Declare 2 variables v1 and v2. Set the first one in the master section. Use the second one in the detail section to increment. Every time reset v2 using v1 before incrementing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top