Results 1 to 5 of 5

Thread: Checking a range of dates

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2004
    Posts
    610

    Checking a range of dates

    hey guyz.. if lets say that i got

    hey.. if i got 2 parameters.. one is the starting date. the other parameter is the range that the user selected..

    1st param - starting date
    2nd param - 6 months down the road

    how do i search the report starting from the first date and then search for records 6 months down the road

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Checking a range of dates

    You can pass two parameters like so...
    VB Code:
    1. moReport.ParameterFields.Item(1).ClearCurrentValueAndRange
    2. moReport.ParameterFields.Item(1).AddCurrentValue dStartDate
    3. moReport.ParameterFields.Item(2).ClearCurrentValueAndRange
    4. moReport.ParameterFields.Item(2).AddCurrentValue dEndDate
    How are you opening your report and setting the datasource?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2004
    Posts
    610

    Re: Checking a range of dates

    i mean in the crystal report itself
    how do i set it to search for a date range
    like starting from the beginning of the year to 6 months down the road?
    Last edited by ryanlum; Mar 18th, 2005 at 01:22 AM.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Checking a range of dates

    Use the record selection formula editor then.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2004
    Posts
    610

    Re: Checking a range of dates

    yiah..
    whats the coding for it?

    like i start from date x.. then i want to search 6 months later..
    how do i set the coding for the 6 months....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width