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

    CR-Math Problem- on change

    I need to count the number of times a user changed job functions and I'm working based on the data that has been loaded in an SQL database. Below you'll find the example of the layout.

    Line# Filename...User........Ent........Crt

    1.........File1.........John........69.........0
    2.........File1.........John........0..........117
    3.........File1.........John........196.......0
    4.........File1.........John........60.........0
    5.........File1.........John........76.........0

    6.........File2.........John.........0.........174
    7.........File2.........John.........0.........95

    8.........File3.........John.........0.........110
    9.........File3.........John.........178.....0
    10.......File3.........John.........0.........70
    11.......File3.........John.........0.........25

    So if I did a count of the files it would = 3 that's not correct...
    if I did a count of the Entered it would = 5 incorrect...
    same mis-calculation for Correcting...

    The number I should get is 7. 1 (for line1) + 1 (for line 2) + 1 (for 3,4,5) + 1 (for 6,7) + 1 (for 8) + 1 (for 9) + 1 (for 10,11)

    For the life of me I can not figure out how to write this calculation into a crystal reports syntax. Any Help would be GREATLY appreciate!!

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

    Re: CR-Math Problem- on change

    Wellcome to codeguru forums !

    Check the attached files
    It's a .rpt file and an .mdb file
    I think that you can solve it using 2 formula fields

    JG
    Attached Files Attached Files

  3. #3
    Join Date
    Jun 2011
    Posts
    2

    Re: CR-Math Problem- on change

    That did the trick!! I have a sore spot on my head from the desk :-).

    Do you know a way to show the highest number in groupfootersection?

    Thanks Again!!

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

    Re: CR-Math Problem- on change

    Do you know a way to show the highest number in groupfootersection?
    1.- In Details Section, Select the field with a right cilck
    2.- Select 'Insert'
    3.- Select 'Summary'
    4.- Select 'Maximum' in 'Calculate this Summary'
    5.- Select the desired group in 'Summary Location'
    6.- Click 'Ok' button
    Do it for all the desired fields ...and that's it!

    JG

Tags for this Thread

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