Filter

Navi_LearnerNavi_Learner Member Posts: 356
Expert, I have report which retrieved data based on the date in asc order. But I have a record which always comes out on the first row no matter which date I entered on the date range. Can anyone tell me what's the problem? Thanks in advance!

Comments

  • SavatageSavatage Member Posts: 7,142
    Is this an e-commerce question? Please post in the correct forum.

    second. You will have to give much more information than this if you want help figuring out why the same line is appearing at the top. Try to be clearer.

    where are you retrieving the data from?
    is this a set Navision report or did you create it?
    you want the report to print in ascending order by date?

    what is this data that keeps appearing?
  • Navi_LearnerNavi_Learner Member Posts: 356
    Thanks, Harry. I created the report with two variables FilterDate1 and FilterDate2. I created a request form and put the two filters on it. The code is
    "Cust. Ledger Entry".SETRANGE("Cust. Ledger Entry"."Due Date", FilterDate1, FilterDate2);
    The report works well except this extra record.
  • SavatageSavatage Member Posts: 7,142
    are there any other filters?

    Are you sure this extra record is not in yur range?
  • DenSterDenSter Member Posts: 8,307
    Where did you put that code? I am putting money on that you put it in the dataitem's OnAfterGetRecord trigger. This executes right AFTER it gets the first record from the database (hence the funky record) and then it sets the filter. If the filter comes out of the request form, put the code into the OnPreReport trigger. That way it runs before it even thinks about the ledger entry table, and the filter is set before it starts reading.
  • Navi_LearnerNavi_Learner Member Posts: 356
    No matter where I put it, it comes out anyway! Why???
  • SavatageSavatage Member Posts: 7,142
    Savatage wrote:
    Are you sure this extra record is not in your "Due Date" range?

    forget about the report for a sec.

    If you go to the Cust.Ledger.Entries & filter on "Due Date" like you would for your report, do you see this record?

    Is there something funky about this record? IS it not in the range you choose? Check it. remember we can only speculate given the info you provided. We can't see the problem or the record.
  • krikikriki Member, Moderator Posts: 9,118
    [Topic moved from Navision e-Commerce forum to Navision forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.