Options

Report display

DnealDneal Member Posts: 103
I have altered the sales quote report to display varying amounts of extended text beside an image for each inventory item selected. In order to get it to display as needed I used arrays to store the extended text and then print it as needed, obviously altering the standard flow of the report.

It is working except that it is only printing just past half way down the page and then going onto the next. It isn't breaking on groupings or anything that I can find set in the properties at all. I have followed some of the global variables and it doesn't appear they would affect it. I also wondered about the CopyLoop and PageLoop dataitems. I didn't see any apparent connection. If anyone has any thoughts on why this could be happening and how to fix it, I would really appreciate it.

Thanks!

Comments

  • Options
    DnealDneal Member Posts: 103
    Here's a little more info... I think I know the reason, but not how to solve it.

    In the report I have added a number of sections to print out any extended text that extends beyond the bottom of the image. These sections are conditionned to print using SHOWOUTPUT based on whether the corresponding array elements have data. For testing, I took these out and it seems to work, however I do need them. The mysterious thing to me is that they are all body sections with the potential to print after each item, but no space occurs after the first two items, only after the third one, leaving the remainder of the page blank.

    *There is also a blank page at the end of the report showing only the footer, but with page 1 on it. Does anyone know how to suppress that?

    Thanks!
  • Options
    kinekine Member Posts: 12,562
    in some cases, there is problem, if you have footer which is not PrintOnEveryPage... because there is problem how to say on which page the footer can be printed.

    If you show it on last page, there will be no space for all bodies, and they must be printed on next page. But in this case, the footer must be on the next page, not on this page. But if it will be on next page, on this page will be enough space to print all bodies and next page is not needed... etc. etc. etc.

    It is loop which is hard to breake. And in some cases the footer make problems.

    And in which trigger you are setting the SHOWOUTPUT? In PreSection or PostSection???
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    BokkBokk Member Posts: 138
    (I'm working with DNeal)

    I believe you are correct in that it is the footer that is creating the issue, not the additional/conditional body sections. (Note: I put the SHOWOUTPUT in the OnPreSection trigger). I can see that now.

    By this time I have altered this report alot to get it to appear as needed. I based my header sections on Sales Line (not PageLoop), added some groupings, retained the SalesLine Footer for totals and added a SalesLine Footer for displaying a section of Standard Terms and Conditions at the end of the quote (about 12 lines) and a Sales Header Footer with a Date and Page No.

    I did have to play around with these already, using different dataitems. The SalesLine Footer should not display on every page, but the Sales Header Footer should.

    I could be flexible with the last Footer and move that info into the header, but the Terms and Conditions must be on the last page only. Do you know if this can be accomplished?? I would also like to suppress the last page that is blank except for the last footer, but with a page no. of 1.

    Thanks for your help!
    SGM
  • Options
    kinekine Member Posts: 12,562
    At first, try to add for example Integer dataitem for your text after Sales Lines... (to be last dataitem in report which is called for every Sales Header (must have same level as Sales Line...)

    The last page with PageNo = 1 - Are you sure that there is no PageNo := 1 somewhere in the report (or something like this)??? (export to text, do search to be sure...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    BokkBokk Member Posts: 138
    I have done some further testing. I tried removing footer(s) and there was no change - I still had 1/3 page blank at the bottom of each page. I tried leaving the footers and removing my conditional sections. That worked, however, I need them to display. To have them display as I need to I stored them in an array.

    I think things are complicated a little because the Sales Line dataItem is processed second, but the display is not put out until 4 dataitems later in the SalesLine dataItem based on the Integer table. I tried the following:
    Based on my arrays created in the Sales Line dataitem 2, I determined the extended text descriptions per item and stored them in an array to be displayed in my conditional sections, if the element was not blank. I tried to replace this array with a table that I would clear after each item displayed. I created a body section with a textbox to hold the description and I want it to loop through that table for each item. I have played with the indenting and properties. My table is populating, but I cannot get any descriptions to display. It seems to skip my last dataitem entirely. I am hoping I am only missing setting some relationship, but can't seem to figure it out. Currently, my dataItems are like this:

    Sales Header <Sales Header> No indent
    Sales Line <Sales Line> 1 indent
    Sales Comment Line <Sales Line Comment> 1 indent
    Integer <CopyLoop> 1 indent
    Integer <PageLoop> 2 indents
    Integer <SalesLine> 3 indents
    Detail Descriptions <Detail Descriptions (my new table)> 4 indents

    Properties for Detail Descriptions:

    DataItemLinkReference: Sales Line
    DataItemLink: LineNumber = Field(Line No.)
    PrintOnlyIfDetail: Yes

    Do you know if this is possible? I am running out of ideas and really need to get this report working properly.

    (I am not always clear on some of the properties when they involve the Integer dataitem, but can usually get them sorted out. ie. DataItemTableView is often SORTING(Number), but sometimes SORTING(Number)WHERE(Number=CONST(1)) - what does the filter do?)

    I would be grateful just to know if it is possible to add these descriptions the way I am trying.

    Thanks,
    SGM
  • Options
    BokkBokk Member Posts: 138
    I was able to get the report displaying as it should. The main issue was how I was accessing the record variable for the new table. I got it coming up, tweaked what it was storing and when to delete and it's finally working.

    I would still appreciate some clarification on the Integer table and it's relationships and properties as mentioned above.

    Thanks!
    SGM
  • Options
    kinekine Member Posts: 12,562
    Bokk wrote:
    (I am not always clear on some of the properties when they involve the Integer dataitem, but can usually get them sorted out. ie. DataItemTableView is often SORTING(Number), but sometimes SORTING(Number)WHERE(Number=CONST(1)) - what does the filter do?)

    If there is no filter, the dataitem will be in "endless" loop (it will loop through whole integer range)... and it is on you when you use Break to stop that. It is mainly used if you need print data from temporary table, when in predataitem you do FIND('-'), in OnGetRecord you do NEXT (except first iteration) and if there are no more records you do BREAK. If there is filter Number=CONST(1), it means, that there will be only one iteration, the OnGetRecord will be called only once and is used for printing some sums etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    BokkBokk Member Posts: 138
    Thanks for the explanation. This report had many challenges, but I think I have learned quite abit.
    SGM
Sign In or Register to comment.