thank you for assistance. The problem is, that the MIN-Value is available AFTER the report has finished. So when the value to be marked is printed, the MIN value is not known yet.
And even with look ahead and two pass reports, I was not able to get this to work. I placed a variable next to my value, set it to look ahead and the report to two pass, and tried to compare in the on calc event:
if = then ppVariable1.Value := '*' else ppVariable1.Value := '';
But this does not work. According to the docs, look ahead is for headers and titles to compare footer?s calculations, so it seems as if look ahead is not suitable for details.
Any idea?
Bernd
What I can do, is placing a variable next to my values and
YW. Then you will need an oracle or a two pass report. Use OnStartFirstPass and OnEndFirstPass events to determine the lowest value and on the second pass place sign near it as suggested before.
Why not? Two pass reports should be the solution.
To summarise; use first pass to get the lowest value, use second pass to mark it. If this fails: 1. You may need to print twice (first one to the screen of course), 2. Better you should try to find a way to detect lowest value before printing.
I just reproduced this with one of the demo reports.
1) Place a variable in the footer and calc it by ... if value < var then value:=var ... Gives you the minimum of the details 2) Add a look ahead var, placed in the detail and compare it to the details value. If equal, set the caption else reset 3) Set the report to two pass
If you run the report, the caption is not set or set at the wrong records.
Bernd, I have built a small app and reproduced your problem. If I am able to understand you correctly, you use a ppVariable at the footer to hold the min value. And you can see the lowest value in the footer but cannot mark it correctly in the detail. If so, it is probable cause is ppVariables reseting after the first pass.
First of all set footer ppVariable's timing to Report Start (right click on it -> Timing...)
Do *not* look ahead detail ppVariable.
OnEndFirstPass event store it's value within another variable (let's name it varMin). This should be before resetting occurs.
On the second pass compare your values with varMin.
This method worked fine for my small app. Pls do not hesitate to tell me if I misunderstand you.
Comments
Bernd
What
it near your values and use OnCalc event;
if = then
ppVariable1.Value := '*'
else
ppVariable1.Value := '';
Good luck,
Sean
thank you for assistance. The problem is, that the MIN-Value is available
AFTER the report has finished. So when the value to be marked is printed,
the MIN value is not known yet.
And even with look ahead and two pass reports, I was not able to get this to
work. I placed a variable next to my value, set it to look ahead and the
report to two pass, and tried to compare in the on calc event:
if = then
ppVariable1.Value := '*'
else
ppVariable1.Value := '';
But this does not work. According to the docs, look ahead is for headers and
titles to compare footer?s calculations, so it seems as if look ahead is not
suitable for details.
Any idea?
Bernd
What I can do, is placing a variable next to my values and
YW. Then you will need an oracle or a two pass report. Use OnStartFirstPass
and OnEndFirstPass events to determine the lowest value and on the second pass
place sign near it as suggested before.
Why not? Two pass reports should be the solution.
To summarise; use first pass to get the lowest value, use second pass to mark
it. If this fails:
1. You may need to print twice (first one to the screen of course),
2. Better you should try to find a way to detect lowest value before printing.
HTW
Sean
this to
I think, the timing is the problem. I get the MIN-Value correctly, but the
comparison in the second pass copmpares to the wrong values.
I?ll try to make a sample program.
Bernd
1) Place a variable in the footer and calc it by
... if value < var then value:=var ...
Gives you the minimum of the details
2) Add a look ahead var, placed in the detail and compare it to the details
value. If equal, set the caption else reset
3) Set the report to two pass
If you run the report, the caption is not set or set at the wrong records.
Cheers
Bernd
understand you correctly, you use a ppVariable at the footer to hold the min
value. And you can see the lowest value in the footer but cannot mark it
correctly in the detail. If so, it is probable cause is ppVariables reseting
after the first pass.
First of all set footer ppVariable's timing to Report Start (right click on it
-> Timing...)
Do *not* look ahead detail ppVariable.
OnEndFirstPass event store it's value within another variable (let's name it
varMin). This should be before resetting occurs.
On the second pass compare your values with varMin.
This method worked fine for my small app. Pls do not hesitate to tell me if I
misunderstand you.
Good luck
Sean
Additionally DM?s support sent me a working samp,e in the meantime.
Many thanks for your assistance!
Bernd