Hey everyone, I’m stuck on a tricky problem with my school’s transcript report in Crystal Reports. I need to total up the credits earned by students, but it’s getting messy.
Most courses are worth 1 credit, but some are only 0.5. These half-credit courses include Physics, Bio, Chemistry, Personal Project, Debate I/II, Intro to Film, and MMUN.
I’ve got a formula that works, but it’s turning into a monster with all the possible combinations a student might have. It’s like playing credit Tetris!
Here’s a snippet of what I’m dealing with:
If IsNull(StudentRecord.Notes) Then
TotalCredits = CourseCount(StudentRecord.Title)
ElseIf StudentRecord.Title = "Science Project" And StudentRecord.Notes = "Life Science: 0.5" Then
TotalCredits = CourseCount(StudentRecord.Title) + 1
ElseIf StudentRecord.Title = "Science Project" And StudentRecord.Notes = "Earth Science: 0.5 credit Physical Science: 0.5 credit" Then
TotalCredits = CourseCount(StudentRecord.Title) + 1.5
// ... and so on for many more conditions
Is there a simpler way to handle this? My brain is starting to melt! Any ideas would be super helpful. Thanks!
hey ethan, sounds like a headache! have u considered using a lookup table for course credits? u could create a separate table with course names and their credit values, then just reference that in ur formula. might simplify things a bunch and make it easier to update later. good luck with ur report!
Hey Ethan85! Wow, that does sound like a brain-melter. Have you thought about approaching this from a different angle? Maybe instead of trying to catch every possible combo in your formula, you could set up a field in your student records that explicitly states the credit value for each course?
That way, you’d just need to sum up those values for each student. It might take a bit of work upfront to add that info, but it could save you tons of headaches down the line. Plus, it’d be way easier to update if credit values change.
Just curious - how often do these credit values actually change? And do you have any control over the database structure, or are you stuck working with what you’ve got?
Keep us posted on how it goes! Transcript reports can be such a pain, but I’m sure you’ll crack it eventually.