How to fix the position of a particular section of a report

mkpjsrmkpjsr Member Posts: 587
Hi experts,

I want to fix a section of a report to be always displayed at a particular position.
Actually i am using Posted Transfer Shipment report and i am using pre-printed stationary to print the report. There may be more than one item in the line and a maximum of 15 line. So, I want that the Transfer Shipment Line (footer) to be always displayed in the middile of the report even if the line contain 1 line or 15 line.
If i am using "Placeinbottom" property of the section then is is being displayed at the bottom but i want to print it in the middle.

How can i do this, can anybody guide me.

Comments

  • mkpjsrmkpjsr Member Posts: 587
    Can anybody tell me, is it possible???
  • SavatageSavatage Member Posts: 7,142
    Search forum for "newpage" to count lines and force a new page

    Take a look at integer data item too
  • mkpjsrmkpjsr Member Posts: 587
    Savatage wrote:
    Search forum for "newpage" to count lines and force a new page

    Take a look at integer data item too

    Hi, thanx for the reply.
    Actually my report will always contain one page only. Can we control the section's height programatically??
  • SavatageSavatage Member Posts: 7,142
    If you want the footer to print in the middle of the page then those 15 potential line better be real small. Place at bottom=no else you want to create a new page size.

    I would use the integer data item. Many post exist. Try a search.
  • mkpjsrmkpjsr Member Posts: 587
    Savatage wrote:
    If you want the footer to print in the middle of the page then those 15 potential line better be real small. Place at bottom=no else you want to create a new page size.

    I would use the integer data item. Many post exist. Try a search.


    Here what i want is that the "transfer shipment line" section always have room for 15 lines even if there is only one item in the line so that footer does not move up and remain in the middile.
  • PeterDPeterD Member Posts: 66
    Place your transfer footer at bottom and make it high enough so your first line apears in the middle of the print?
  • rsaritzkyrsaritzky Member Posts: 469
    If I understand your question correctly, you want this:

    Scenario 1: 1 Transfer line

    Transfer line 1
    Blank line
    Blank line
    ... (total of 14 blank lines)
    Footer

    Scenario 2: 2 transfer lines
    Transfer Line 1
    Transfer Line 2
    (total of 13 blank lines)
    Footer

    Scenario 3: 14 transfer lines
    Transfer line 1
    Transfer line 2
    Transfer line 3
    ..etc through 14
    Footer

    If that's what you're looking for, then the previous suggestion of an additional dataitem based on "Integer" is one way to do it.

    As you process/print the Transfer lines, keep track of the line count, e.g. in the "Transfer Line" section of the report, add
    LineCounter := LineCounter + 1;
    (Don't forget to re-initialize LineCounter to 0 at the beginning of each document)

    Now add a dataitem "Integer" after the Transfer Lines section, and add a section in the report with one blank line. Then, include code in the dataitem:

    IF LineCounter > 14 THEN
    CurrReport.BREAK; // Doesn't print any (more) blank lines if more than 14 transfer lines printed
    LineCounter := LineCounter + 1; // Continues to increment LineCounter

    So, if there are 4 Transfer lines, LineCounter will have a value of 4 before dropping into the Integer dataitem.
    The Integer dataitem will repeat 10 times (printing a blank line each time), then will execute a BREAK, dropping into the next dataitem.

    You'll probably have to move the "Footer" section of the Transfer Line into the "Footer" section of the Integer dataitem.

    Hope this helps
    Ron
  • mkpjsrmkpjsr Member Posts: 587
    rsaritzky wrote:
    If I understand your question correctly, you want this:

    Scenario 1: 1 Transfer line

    Transfer line 1
    Blank line
    Blank line
    ... (total of 14 blank lines)
    Footer

    Scenario 2: 2 transfer lines
    Transfer Line 1
    Transfer Line 2
    (total of 13 blank lines)
    Footer

    Scenario 3: 14 transfer lines
    Transfer line 1
    Transfer line 2
    Transfer line 3
    ..etc through 14
    Footer

    If that's what you're looking for, then the previous suggestion of an additional dataitem based on "Integer" is one way to do it.

    As you process/print the Transfer lines, keep track of the line count, e.g. in the "Transfer Line" section of the report, add
    LineCounter := LineCounter + 1;
    (Don't forget to re-initialize LineCounter to 0 at the beginning of each document)

    Now add a dataitem "Integer" after the Transfer Lines section, and add a section in the report with one blank line. Then, include code in the dataitem:

    IF LineCounter > 14 THEN
    CurrReport.BREAK; // Doesn't print any (more) blank lines if more than 14 transfer lines printed
    LineCounter := LineCounter + 1; // Continues to increment LineCounter

    So, if there are 4 Transfer lines, LineCounter will have a value of 4 before dropping into the Integer dataitem.
    The Integer dataitem will repeat 10 times (printing a blank line each time), then will execute a BREAK, dropping into the next dataitem.

    You'll probably have to move the "Footer" section of the Transfer Line into the "Footer" section of the Integer dataitem.

    Hope this helps

    Hi, thanx for the reply, i have tried this but still the problem is not 100% resolved.
    If my transfer line is having 15 lines then its print the first line and 14 blank lines and then the rest of 14 lines of data. but i want to print all 15 lines of data then the footer.

    Also if the transfer line has only one line of data then its working fine, means printing the first line and then 14 blank lines....
  • mkpjsrmkpjsr Member Posts: 587
    rsaritzky wrote:
    IF LineCounter > 14 THEN
    CurrReport.BREAK; // Doesn't print any (more) blank lines if more than 14 transfer lines printed
    LineCounter := LineCounter + 1; // Continues to increment LineCounter

    I think the above code is working just after printing the first transfer line, where should i place this code so that it executes after printing all 15 lines of data..
  • rsaritzkyrsaritzky Member Posts: 469
    I'm not exactly sure what you are asking - can you lay out an example?

    Ron
    Ron
  • rsaritzkyrsaritzky Member Posts: 469
    mkpjsr wrote:
    rsaritzky wrote:
    Hi, thanx for the reply, i have tried this but still the problem is not 100% resolved.
    If my transfer line is having 15 lines then its print the first line and 14 blank lines and then the rest of 14 lines of data. but i want to print all 15 lines of data then the footer.

    Also if the transfer line has only one line of data then its working fine, means printing the first line and then 14 blank lines....

    I think I understand now what you are describing. Please confirm this.

    What I think you are saying is that you are getting

    Transfer line 1
    Blank line
    Blank line
    Blank line
    <repeated 14 times>

    Transfer line 2
    Transfer line 3
    Transfer line 4
    ...
    Transfer line 15

    If this is the case, the problem is probably in 2 places:
    a. The Integer dataitem is indented under the Transfer Line - it should be at the same indentation level
    b. The LineCounter is not being reinitialized properly

    Send me a Private Message and I'll see if I can help.
    Ron
Sign In or Register to comment.