Solved

Most Current Date Max date

Posted on 2008-10-31
5
2,018 Views
Last Modified: 2013-11-15
need to retreive prices current date
0
Comment
Question by:082156r
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 17

Expert Comment

by:MIKE
ID: 22855264
You can do in a variety of ways. How are you wanting to do it? Within Crystal itself? Using SQL?

If within Crystal,...use the GROUP SELECT EXPERT and put your MAX logic there...or you can use RECORD SELECT EXPERT...and pull based on actual DATES....

What exactly are you trying to accomplish?
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 500 total points
ID: 22855734
This is a pretty common requirement (show me the most recent/current records), but it's not handled very elegantly in Crystal Reports.  CRXIuser2005 asked a very good question and your answer will help determine the most efficient solution.   Another important question is "are you using a SQL-based database, like SQL Server?"

If you're trying to do this in Crystal Reports AND are reporting against a SQL-based database, the most efficient method is to create a SQL Expression field that identifies the most recent records.  You can then filter the report based on the expression field.  The benefit to doing this is that you pull only the records you need from the database rather than pulling all records and then suppressing them after the fact with conditional suppression or group select formulas.

I've attached a presentation with an example, starting on Slide 29.
The-Power-and-Possibilities-of-S.pdf
0
 
LVL 17

Expert Comment

by:MIKE
ID: 22864682
I would just add that for "efficiency sake" I would recommend using SQL Expression as these are the fastest. If you don't know how to create SQL Logic in SQL Server you may need the help of your SQL Programmer.

I've used  Expressions on many occasions to extract a single data base object and the amount of LOGIC that can be placed within these Expressions is limitless....

M
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question