Variable indent

I need to produce a report with variable indenting for each row - a bit like a treeview. I don't need lines but I do need to be able to have at three levels of with each row having a glyph, a title, a score, a bar showing a percentage and possibly free text comments. I've attached a jpg of what I'm trying to achieve (apart from the comments - I'm still working on multi line display for each row).
Rpt.jpg 40.2K

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:33PM
    hi Roy long time since i've heard from you
    here is some sample code for shifting objects could be object or band use obp events and you will need oap events as settings will maccumulate

    shifting a detail h&v
    var
    savedy, oldy,oldx:double;
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
    oldx:= engine.curx; //horiz
    oldy:= engine.cury; //vertical used only for line1 of detail
    // added to make memo stretch
    if <line#> = 2 then memo1.memo.add('stretched')
    end;

    procedure DetailData1OnBeforePrint(Sender: TfrxComponent);
    begin
    savedy:= engine.cury; //get the engines cury and saveit
    if <line#> = 1 then
    begin

    engine.cury :=oldy;// shift up
    //shift right could be memo1.left+memo1.width +value for space;
    engine.curx := engine.curx+memo1.width +5;
    end;


    end;
    procedure DetailData1OnAfterPrint(Sender: TfrxComponent);
    begin
    // reset the horizontal value
    if <line#> =1 then
    begin
    engine.curx := oldx;
    // reset vertical
    engine.cury := savedy;
    end;
    end;

    begin

    end.
  • edited 7:33PM
    Almost everything I do is on-screen, and programming is mainly a hobby both of which explains why I'm an infrequent visitor [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> The code looks promising. I'll try it out tomorrow. It should be simpler for me because I have an indent picked up as part of my query so I can just use designed+(indent * offset) with designed and offset being constants.[/img]
  • edited 7:33PM
    RoyLambert wrote: »
    I need to produce a report with variable indenting for each row - a bit like a treeview. I don't need lines but I do need to be able to have at three levels of with each row having a glyph, a title, a score, a bar showing a percentage and possibly free text comments. I've attached a jpg of what I'm trying to achieve (apart from the comments - I'm still working on multi line display for each row).

    The only way I know how to do this is using Align Left with blank TfrxMemoView(s)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.