Pageheader and Groupheader problems??

Hi.
I have two problems in my project.

My project:
I have customer db. (CustomerName,CustomerSurname,CustomerCity,CustomerPic)

My report properties either problems:
1.Groupheader1 (Condition property: frxDBDataset1."CustomerCity", Startnewpage property:true,because I am wanting to group for customer city)
2.Masterdata1 (Dataset property:frxDBDataset1,Columns property:6)
3.Picture1(In masterdata band,It shows customer picture,Datafield property:Customerpic)
4.Memo1(In masterdata band,It shows customer name,Datafield property:Customername)

1. Problems:
My report design:

Comments

  • edited December 2010
    I think the problem is caused by the sequence the events are executed.
    I'd try and see whether adding a groupfooter changes anything. If not, I'd manage it in code with a variable that lags the event, i.e. it is set in the OnAfterPrint event of the groupheader. Of course you'll have to initialize it correctly for the first groupheader.
  • edited 12:48AM
    thanks technisoft for answer.
    But my english and my fastreport code nor good:(
    Pls help as example code or sample fr3 file.
    Thanks again...
  • edited 12:48AM
    Pls help gordk >>
  • edited 12:48AM
    Something like this pseudo code, untested.

    var
    headerstring : string;

    reporttitle.OnAfterPrint
    begin
    // initialize for 1st group header
    headerstring := table."data";
    end;

    pageheader.OnBeforePrint
    begin
    memo.Text := headerstring;
    end;

    pageheader.OnAfterPrint
    begin
    //preserve current value
    headerstring := table."data";
    end;
  • edited 12:48AM
    thanks for asnwrer technisoft...
    but it is not worikng:(
    pageheader is not show right again:(
  • edited December 2010
    Diablomus wrote: »
    thanks for asnwrer technisoft...
    but it is not worikng:(
    pageheader is not show right again:(
    Right, it is not right. I played around with a layout similar to yours and I could get the same problem you have.
    Worst of all, its presence seems to depend on the number of columns across and the height of the masterdata band.
    That looks like eternal trouble to me.

    The easy and working alternative is this layout:

    PageHeader - prints <table."city">

    GroupHeader - breaks on <table."city"> but has no printable components

    MasterData.Columns := 1;
    Page.Columns := 6;

    The only difference is that the data runs from
    top to botton (column1) then top to botton (column2) etc
    instead of
    left to right (row1) then left to right (row2) etc.
  • edited 12:48AM
    thanks for answer and solution technisoft
    Good solution but not good for me [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> because the data must run top to bottom (column1) then top to bottom (column2)[/img][img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> thanks again...[/img]
  • edited December 2010
    Diablomus wrote: »
    thanks for answer and solution technisoft
    Good solution but not good for me [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> because the data must run top to bottom (column1) then top to bottom (column2)[/img][img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> thanks again...[/img]
    But this is what my solution does.
    Your layout works row1 (left to right), row2 (left to right), row3 (left to right)

    But does it really matter even if my solution would not produce what you want exactly (in terms of sequence) as you start a new page for every city anyway?
    Sometimes one just has to say that something is not possible.
  • edited 12:48AM
    Sorry my english not good.
    i has wrote false
    Right: the data must run left to right (row1) then left to right (row2).
    and i am starting a new page for every city..
  • edited 12:48AM
    Pls helps friends >[img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> . My project stopped[/img]>> .

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.