Greenbar of break footer in report

I have a report procedure with break structure defined (header/detail/footer).

I would like to create a greenbar effect on this report. What actually prints is only break footer so this is these are my “greenbar lines”. But I don’t know where to put the embed code where I would alternately hide/unhide my color box which would create greenbar effect on the report?

Where is the point where “print break footer” happens?

Thanks

Bostjan

Hi,
go to source and find where is the PRINT statement of the detail you are interested. The embed points depends on the template used for report generation and is not really important. Before the PRINT statement issue some report$?somebox{prop:color} or similar command.
Hth
Nenad

Works for detail itself, but not for footer because footer is not printed each time detail is. So you end up with 3, 4 colored lines, then a few non-colored etc

aha ok, I used in past CPCS report template where you use normal details even for header and footers, and there you can add some code before footer detail printing. I find this template very useful.

1 Like

The BREAK Detail processing happens automatically in the Report Engine, you do not get any kind of event or call back before the Break Footer prints.

To have that manual control you’ll have to Not use a BREAK band and instead to code the Break logic and PRINT the bands. CPCS does have a nice feature to generate that code with embed points before and after printing Headers and Footers. It will retain selected “Broke Fields” which can be confusing that when the Break happens the new data is in the records but you can need fields from the prior record.

2 Likes

Ok. I just left the bands as they were, enabled Break logic and in the embed BreakMgr.TakeEnd after this code:

CASE BreakId
     OF 1
        CASE LevelId
        OF 1 !datum

put my code:

report$?footer1{'__greenbar__'}=choose(report$?footer1{'__greenbar__'}=1,0,1)
report$?box2{prop:hide}=report$?footer1{'__greenbar__'}

This works beautifully now. Thank you, Carl.

1 Like