CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    596

    Field Display Problem

    Hello everyone. With CR8.5 I need to be able to allow a user to enter a Quarter when prompted, such as 1, 2, 3, or 4. Our tables don't store quarters. We store months as integers which we call periods. A valid period could be any integer value from one to twelve. I know how to create a parameter for grabbing the quarter value but how do get the report to just show me the periods (months) that pertain to the desired quarter? Can someone super please give me a hand with this?

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Field Display Problem

    You could use a RecordSelectionFormula in your rpt
    Let's say that your parameter is named @quarter, then the formula could be like this:
    Code:
    ( {@quarter}=1 And {Tablex.Month}>=1 And {Tablex.Month}<=3) ) Or
    ( {@quarter}=2 And {Tablex.Month}>=4 And {Tablex.Month}<=6) ) Or
    ( {@quarter}=3 And {Tablex.Month}>=7 And {Tablex.Month}<=9) ) Or
    ( {@quarter}=4 And {Tablex.Month}>=10 And {Tablex.Month}<=12) )
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

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

Featured