Repeating lines in report

Alex_de_VriesAlex_de_Vries Member Posts: 9
Dear all,

Does anyone know what I can do about the following problem I have:

I am creating a report in Navision with three tables. When I pre-run the report somehow the indented DataItem shows results in four identical lines. The lines represent bookings on 4 days but I want to have them reported at the same line. I can get some information (from another dataitem) in one line in the same report!

Does anyone know what I am doing wrong?

Thanks in advance for your reply!

Alex

Comments

  • SavatageSavatage Member Posts: 7,142
    is the section a "body" section or a "trans footer" or "group footer"?

    looks to me you have it on a body section
  • Alex_de_VriesAlex_de_Vries Member Posts: 9
    Dear Harry,

    Yes, it's in the body section.

    Best regards,

    Alex
  • SavatageSavatage Member Posts: 7,142
    The body section will print all the lines that why you can create trans footers & group footers.
    In those sections you can Group, subtotal n such.

    you can use the ol

    OnPreSection()
    CurrReport.SHOWOUTPUT := PrintDetail;

    as seen the a/r aging - to turn on or turn off the printing of the lines.
  • Alex_de_VriesAlex_de_Vries Member Posts: 9
    Thanks to Harry for the help on this. It did the trick...

    However, testing the report further I noticed it doesn't give the data I need (the first test was perhaps a lucky shot because the data was right?). I think it is because of linking the tables.

    I need to search on Year (eg. 2008) , Week (eg. 52) and project no. (eg. 7030)

    The tables which have the data I need in one report contain these data, however the project no. in one table is called "code" in the other table and has an an added alphabetical code (eg. ABC 7030)

    Therefore I added one table/ DataItem called "project" which links the project no. (eg. 7030) and the code (eg. ABC 7030). The DataItem hierachy looks this now:
    Table "one" (containing year, week, and project no.)
    indented (>): Table "project"
    Indented (>>): Table "two"(containing year, week and code)

    Now I face the following problem: Filtering the report on year and week gives me the right data from the first table, but the wrong data from the second table, I think because the year/week filter doesn't apply to that DataItem.

    My question therefore is, is there some way to link the two DataItems ("one" AND "Project") directly to the last DataItem, Table "Two"?

    Thanks in advance for your replies!

    Alex.
  • DaveTDaveT Member Posts: 1,039
    Hi Alex,

    You can use the COPYFILTERS or the GETFILTER/SETFILTER commands to filter Table "two" the sames as table "one". The COPYFILTERS will work if they are the same table and to use the GETFILTER use something like

    TableTwo.setfilter( Year, TableOne.GETFILTER( Year ) );

    Put this code in the on-predataitem trigger.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • Alex_de_VriesAlex_de_Vries Member Posts: 9
    Hi Dave,

    Thank you so much for your response. It works!

    With the report I have created now I am sure the people in our company will be helped a lot. Resistance for using Navision in our company will be a lot less!

    Br, Alex
  • DaveTDaveT Member Posts: 1,039
    Hi Alex,

    Well done - we only guided - you did the hard work :mrgreen:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • Alex_de_VriesAlex_de_Vries Member Posts: 9
    Dear all,

    I thought I was there, but unfortunately there is one more issue in the report...

    As I said in previous posts I have two tables/DataItems with almost the same content. The structure of my DataItems is as follows:

    TableOne (with year, week, project no.)
    > Project Table (with project no., code)
    >> TableTwo (with year, week, code)

    Now tableOne can have data filtered based on year, week and project no. but not necessarily, while in table two there is data!

    Now the problem is, that I need to have the data from TableTwo in my report, but It will not be printed because the filtering of table one.

    Switching the DataItem structure (TableTwo first) is no option, because also table two might not contain data on year, week, code while TableOne does.

    Does anybody know what to do about this?

    I hope this is the last issue i'm facing regarding this report.

    Again thanks for the help I already received!

    Alex
  • mootsoomootsoo Member Posts: 70
    Hello & Happy new year all!
    I have a question.
    I have a few reports. And they all has layout. User defining what should be in the report. It's mean some times the report will not preview some information. But when report views the empty space. User don't want to see that data but there is data space. Empty space.
    Can it be check some condition. It's mean if there is no data then delete the space.
    Because 5 or 6 line information takes 2 pages. It can be viewed half maybe quarter of page.
    I hope i have explained not clear but enough.

    Regards
    bye my work, bye navision
  • mootsoomootsoo Member Posts: 70
    no body knows this?
    :-k
    bye my work, bye navision
  • BeliasBelias Member Posts: 2,998
    in onpresection trigger:
    Currreport.showoutput((myfirstfield<>'') and (mysecondfield <>''));
    
    this is something like savatage's post...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • DaveTDaveT Member Posts: 1,039
    Hi,

    .. also see if the PrintOnlyIfDetail property will help
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • mootsoomootsoo Member Posts: 70
    ok, thanks!

    Regards
    bye my work, bye navision
Sign In or Register to comment.