ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Any Crystal Reports Wizards Here?

    IT Discussion
    4
    12
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      anthonyh
      last edited by anthonyh

      I've had to reluctantly learn Crystal Reports to develop a multitude of reports for one of our systems that the vendor has refused to develop without a hefty development fee. #JustOneOfManyHats

      In any rate, I have a report that pulls the most recent record from a given table. The way I do this is basically I pull all records that match my criteria, sort them in descending order based on their entry date, then put the desired fields in the report header (so only the first record shows). This works beautifully.

      However, I've been asked to display the second record in said scenario above if one of the fields matches a field in the first record. Ok, simple enough (or so I thought).

      I moved the fields down to the details section and then set a suppression formula as so:

      {table.field} <> previous({table.field})

      However, it doesn't display the second record. Even if there are only two records and the field's match.

      I suspect this is probably due to the order of operations in Crystal Reports. I don't know when it sorts vs when the suppression logic comes into play. I tried adding "whileprintingrecords;" to the suppression logic but it didn't seem to help.

      Any ideas?

      1 Reply Last reply Reply Quote 2
      • D
        DustinB3403
        last edited by

        So you need to show two records, if the second record matches a particular field in the first record correct?

        Why not create a sub-report that will list all records that match anything in the first record?

        A 1 Reply Last reply Reply Quote 0
        • A
          anthonyh @DustinB3403
          last edited by

          @DustinB3403 said in Any Crystal Reports Wizards Here?:

          So you need to show two records, if the second record matches a particular field in the first record correct?

          Why not create a sub-report that will list all records that match anything in the first record?

          Because this is already a sub-report. 😄

          The desired output is to show the newest record. If the second newest record has the same "name" as the newest record, I need to display both (as this is a flag for the users of said report that they need to fix something in the system).

          1 Reply Last reply Reply Quote 0
          • A
            anthonyh
            last edited by

            I THINK I KNOW WHATS HAPPENING!

            The first record is getting suppressed because it doesn't have a "previous" record to match to!

            So I just need to implement logic to say "if this is record 1 don't do anything".

            1 Reply Last reply Reply Quote 0
            • D
              DustinB3403
              last edited by

              Without seeing the report / database it's difficult.

              But I understand a bit better.

              What is your filtering parameter setup for?

              1 Reply Last reply Reply Quote 0
              • A
                anthonyh
                last edited by

                BOOM. Adding not(OnFirstRecord) to my logic makes it work beautifully.

                1 Reply Last reply Reply Quote 1
                • D
                  DustinB3403
                  last edited by

                  Glad you got it sorted, wasn't to bad was it?

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    aaron-closed account Banned
                    last edited by

                    This post is deleted!
                    D 1 Reply Last reply Reply Quote 0
                    • D
                      DustinB3403 @aaron-closed account
                      last edited by

                      @aaron said in Any Crystal Reports Wizards Here?:

                      I'm not a wizard, but have used it before and you have my sympathy for even touching it.

                      I don't think Crystal is that bad at all really.

                      It's just a matter of correlating the database records and aligning them to the tables that you need the data on. Everything else is often as simple as just doing the math.

                      A W 2 Replies Last reply Reply Quote 0
                      • A
                        aaron-closed account Banned @DustinB3403
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • W
                          wirestyle22 @DustinB3403
                          last edited by

                          @DustinB3403 said in Any Crystal Reports Wizards Here?:

                          @aaron said in Any Crystal Reports Wizards Here?:

                          I'm not a wizard, but have used it before and you have my sympathy for even touching it.

                          I don't think Crystal is that bad at all really.

                          It's just a matter of correlating the database records and aligning them to the tables that you need the data on. Everything else is often as simple as just doing the math.

                          Database management is my least favorite part of my job

                          1 Reply Last reply Reply Quote 0
                          • A
                            anthonyh @DustinB3403
                            last edited by

                            @DustinB3403 lol, no it wasn't.

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post