Hi,
I have a problem about can I hidden a row after calculating inside the report?
for example:
I have a column a have 5 datas as 100,200,300,400,500.
and I want to display the cumulative value >350.
That means the first 100,200 don't display and display 300,400,500.
But those calculation was completed during rendering.
So the result as
300
400
500
How can I do this?
Can I set it at the renderingEvent say
if (abc += a < 350) Databand.CountData = 0;
Thx.
Hidden row after calculating
Hidden row after calculating
You need a running variable mysum
On the OnRenderingEvent of the databand you do:
mysum += myfield;
On the BeforePrintEvent on the databand you do
databand.Enabeld = mysum > 350
Marco
On the OnRenderingEvent of the databand you do:
mysum += myfield;
On the BeforePrintEvent on the databand you do
databand.Enabeld = mysum > 350
Marco
Hidden row after calculating
Oh, Thx.
I have tried your method but found it's not work.
I found that databand.Enabeld = mysum > 350 does not display anything.
But during I changed to databand.Enabeld = mysum < 350 it display the first 3 row as the data 100,200,300.
I would like to check each row of data of mysum to see which row is grater than 350 then show it out.
And one more thing I found that 300 should not be show if mysum <350.
I think the vaule of mysum did not change during beforeprintevent. Thus the result also wrong.
Thx.
I have tried your method but found it's not work.
I found that databand.Enabeld = mysum > 350 does not display anything.
But during I changed to databand.Enabeld = mysum < 350 it display the first 3 row as the data 100,200,300.
I would like to check each row of data of mysum to see which row is grater than 350 then show it out.
And one more thing I found that 300 should not be show if mysum <350.
I think the vaule of mysum did not change during beforeprintevent. Thus the result also wrong.
Thx.
Hidden row after calculating
Please move the code from OnRenderingEvent in the Marco's solution into BeforePrintEvent:
BeforePrintEvent:
mysum += myfield;
databand.Enabeld = mysum > 350;
Thank you.
BeforePrintEvent:
mysum += myfield;
databand.Enabeld = mysum > 350;
Thank you.