Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Question Unanswered: Need Help With Command Line

    Im not very good at programming, and need help with the correct language for the following scenario.

    Within MS Access, I have the following data:

    Table A has person's name and ID number.
    Table B has persons test date, test score and ID number.
    A relationship is set from A to B via ID number.

    Table A has a subform inserted, which is a datasheet for Table B.
    The subform allows multiple entries to Table B.

    So for example, Table A has Jane Smith and Table B shows that she had a test on 4/1 of 80, 5/1 of 90 and 6/1 of 95. On the Table B side, she shows three entries, one for each I listed.

    For the Crystal report, I am looking to have one line for the person (Jane Smith) and only list the most recent grade that she received.

    I cant seem to make this happen no matter what commands I try. My results always end up with three lines for Jane Smith, each line having her name and ID and each one listing each of the grades.

    Any programming suggestions. Im really not too good at this.

  2. #2
    Join Date
    Aug 2004
    Hi penataquit,

    You don't say what version of Crystal you are using so this is based on version 8.5!

    If I understand your problem correctly you are trying to get just the latest result from a set of results for each entry in one of your databases?

    What you would need to do is group by the individual, then use the "Top N"
    option - setting the 'based on' option to 'date' and the N value to 1.

    If you try it in the 'report expert' option you can then view the code in the SQL window to see how it works.

    Also be careful that you have the links between your databases set correctly to 'Inner Joins' or 'Outer Joins' or this will cause problems.

    Hope that this helps


Posting Permissions

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