Get all the equals dates in tablefilter

DarkHorseDarkHorse Member Posts: 389
Hello, I've a Dataitem and, on Dataitemtableview, on TableFilter, I'd like to know how I could, with a date type filed, indicates (with CONST or FILTER) that get all the equals dates.
Thanks in advance.

Comments

  • colingbradleycolingbradley Member Posts: 162
    Can you give an example?
    Not sure what you want to do...
    What is "equals dates"?
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Thanks for reply. I mean that, using table filter as I said, put for example on field "Posting Date" and lister all the lines that has 12-03-09 as a posting date. But I'd like to find same code on Value that means "find all the same dates". Another example, if you want to lister all the lines that has the Posting Date field informed you can put on Value <>''; I refer some operation like this. Sorry if I don't explain well myself.
    Thank you for help.
  • colingbradleycolingbradley Member Posts: 162
    Other than field and table filters, I cannot see how you could improve the situation.

    Try and explain how the table filter does NOT do what you want.
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Thanks for reply. I'll try to explain better. My report shows item lines from Sales Shipment Line table; in that table there is the "Posting Date" field; I want filter all the lines (items) that has the same Posting Date. I wanted to do that on DataItemTableView but it can be also in Sales Shipment Line body trigger, doesn't matter. I hope I've explained well, sorry.
    Thanks in advance.
  • colingbradleycolingbradley Member Posts: 162
    Did you add the "Posting Date" field to the shipment lines yourself?
    It is not part of standard Nav (at least for all the versions I have worked on).
    Is the field a Flowfield or is a variable in the report?
    What version are you using?
    SQL or Native DB
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    No, sorry for the mistake :oops: , it's "Shipment Date" from "Sales Shipment Line", not Posting Date. I've Attain 3.70, native.
    Thanks.
  • colingbradleycolingbradley Member Posts: 162
    Do you want to Group by the Shipment Date, this will keep all records with teh same shipment date together.
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Yes, I guess it would be that. How I do that?.
    Thanks for help.
  • colingbradleycolingbradley Member Posts: 162
    try this (don't forget to change the object number):

    OBJECT Report 61001 s.ship lines sort by date
    {
    OBJECT-PROPERTIES
    {
    Date=20/04/09;
    Time=13:52:54;
    Modified=Yes;
    Version List=;
    }
    PROPERTIES
    {
    }
    DATAITEMS
    {
    { PROPERTIES
    {
    DataItemTable=Table111;
    DataItemTableView=SORTING(Shipment Date,Posting Group);
    OnPreDataItem=BEGIN
    LastFieldNo := FIELDNO("Shipment Date");
    END;

    ReqFilterFields=Shipment Date;
    GroupTotalFields=Shipment Date;
    }
    SECTIONS
    {
    { PROPERTIES
    {
    SectionType=Header;
    PrintOnEveryPage=Yes;
    SectionWidth=18150;
    SectionHeight=1692;
    }
    CONTROLS
    {
    { 1000000001;Label ;0 ;0 ;7500 ;423 ;FontSize=8;
    FontBold=Yes;
    CaptionML=[ENU=Sales Shipment Line;
    ENG=Sales Shipment Line] }
    { 1000000002;TextBox;15000;0 ;3150 ;423 ;HorzAlign=Right;
    SourceExpr=FORMAT(TODAY,0,4) }
    { 1000000003;TextBox;0 ;423 ;7500 ;423 ;SourceExpr=COMPANYNAME }
    { 1000000004;TextBox;17700;423 ;450 ;423 ;CaptionML=ENG=Page;
    SourceExpr=CurrReport.PAGENO }
    { 1000000005;Label ;16950;423 ;750 ;423 ;ParentControl=1000000004 }
    { 1000000006;TextBox;15900;846 ;2250 ;423 ;HorzAlign=Right;
    SourceExpr=USERID }
    }
    }
    { PROPERTIES
    {
    SectionType=Header;
    PrintOnEveryPage=Yes;
    SectionWidth=18150;
    SectionHeight=1269;
    }
    CONTROLS
    {
    { 1000000012;Label ;0 ;0 ;1500 ;846 ;ParentControl=1000000011;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000015;Label ;1650 ;0 ;1500 ;846 ;ParentControl=1000000014;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000018;Label ;3300 ;0 ;1050 ;846 ;ParentControl=1000000017;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000021;Label ;4500 ;0 ;300 ;846 ;ParentControl=1000000020;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000024;Label ;4950 ;0 ;1500 ;846 ;ParentControl=1000000023;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000027;Label ;6600 ;0 ;1200 ;846 ;ParentControl=1000000026;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    { 1000000030;Label ;7950 ;0 ;4500 ;846 ;ParentControl=1000000029;
    VertAlign=Bottom;
    FontBold=Yes;
    MultiLine=Yes }
    }
    }
    { PROPERTIES
    {
    SectionType=GroupHeader;
    SectionWidth=18150;
    SectionHeight=846;
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT := FooterPrinted;
    FooterPrinted := FALSE;
    END;

    }
    CONTROLS
    {
    }
    }
    { PROPERTIES
    {
    SectionType=GroupHeader;
    SectionWidth=18150;
    SectionHeight=423;
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT :=
    CurrReport.TOTALSCAUSEDBY = "Sales Shipment Line".FIELDNO("Shipment Date");
    END;

    }
    CONTROLS
    {
    { 1000000008;TextBox;3150 ;0 ;1200 ;423 ;HorzAlign=Left;
    SourceExpr="Shipment Date" }
    { 1000000009;Label ;0 ;0 ;3000 ;423 ;ParentControl=1000000008 }
    }
    }
    { PROPERTIES
    {
    SectionType=GroupHeader;
    SectionWidth=18150;
    SectionHeight=423;
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT :=
    CurrReport.TOTALSCAUSEDBY = LastFieldNo;
    END;

    }
    CONTROLS
    {
    }
    }
    { PROPERTIES
    {
    SectionType=Body;
    SectionWidth=18150;
    SectionHeight=423;
    }
    CONTROLS
    {
    { 1000000011;TextBox;0 ;0 ;1500 ;423 ;HorzAlign=Left;
    SourceExpr="Sell-to Customer No." }
    { 1000000014;TextBox;1650 ;0 ;1500 ;423 ;HorzAlign=Left;
    SourceExpr="Document No." }
    { 1000000017;TextBox;3300 ;0 ;1050 ;423 ;HorzAlign=Right;
    SourceExpr="Line No." }
    { 1000000020;TextBox;4500 ;0 ;300 ;423 ;HorzAlign=Left;
    SourceExpr=Type }
    { 1000000023;TextBox;4950 ;0 ;1500 ;423 ;HorzAlign=Left;
    SourceExpr="No." }
    { 1000000026;TextBox;6600 ;0 ;1200 ;423 ;HorzAlign=Left;
    SourceExpr="Shipment Date" }
    { 1000000029;TextBox;7950 ;0 ;4500 ;423 ;HorzAlign=Left;
    SourceExpr=Description }
    }
    }
    { PROPERTIES
    {
    SectionType=GroupFooter;
    SectionWidth=18150;
    SectionHeight=0;
    OnPreSection=BEGIN
    IF NOT FooterPrinted THEN
    LastFieldNo := CurrReport.TOTALSCAUSEDBY;
    CurrReport.SHOWOUTPUT := NOT FooterPrinted;
    FooterPrinted := TRUE;
    END;

    }
    CONTROLS
    {
    }
    }
    }
    }
    }
    REQUESTFORM
    {
    PROPERTIES
    {
    Width=9020;
    Height=3410;
    }
    CONTROLS
    {
    }
    }
    CODE
    {
    VAR
    LastFieldNo@1000000000 : Integer;
    FooterPrinted@1000000001 : Boolean;

    BEGIN
    END.
    }
    }
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Thanks. How incorporate this code please?, Sorry, I don't know too much about navision.
    Thanks for help.
  • colingbradleycolingbradley Member Posts: 162
    Copy the code and save into a text editor.
    Renumber the object number (61001 is just a temporary number, you need one of your own numbers).

    WARNING: Make sure that the number you choose is free as Navision will replace any report already there with this number.

    File/Import and then change the report column headings and add/change the fields you need.

    F11 to compile and then it should be OK.
    :)

    I am assuming that you have the appropriate licence to do this.
    If not, just tell me what object number you can use and send an email, I will sent the report back as a .fob file
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Thanks; on import it stops al line 5 and says "it cannot write on DATE=24/04/09 in FieldNo". Do you know how's the matter, please?.
    Thanks in advance.
  • colingbradleycolingbradley Member Posts: 162
    I would think that the date format may be set differently on your computer, try changing the dd and mm around, open the .txt file and edit it: 04/24/09. that is the USA style.
    Experience is what you get when you hoped to get money
  • DarkHorseDarkHorse Member Posts: 389
    Thanks; but occurs the same. My format is correct; however, if I erase the line it stops at the following. I don't know what's the problem. Sorry for the inconveniences.
    Thanks for help.
Sign In or Register to comment.