Solved

Missing last years detail records in Crystal Report

Posted on 2009-05-20
4
273 Views
Last Modified: 2012-06-27
I have a report to show sales counts of items using scanned data from stores.  I want to compare last years to current years.  The only record selection I'm using is the store number.  There is a parameter for starting date and ending date the user would enter.  If the detail record is in this years date range, the count is added to a variable, CYitem.  If the detail record date is in last year, for the same time period (say a month) then the count is added to another variable, lyitem.   I never see detail records for last years sales, but the summary at the next level has a total in it.  What could cause the records not to show up?  The real difficulty is if there is 0 sales in current year of an item, but there are sales in last year.  This makes the listed items not total down to the actual summary.
0
Comment
Question by:Datakat
[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
4 Comments
 
LVL 2

Expert Comment

by:vetaldj
ID: 24436711
Can you post your formula where you adding them?
0
 
LVL 35

Accepted Solution

by:
James0628 earned 250 total points
ID: 24438128
So, you're saying that you don't see records for last year, but you get totals for last year?  That would imply that the report is reading the records, but not showing them to you.

 In the report Design view, right-click the name of the section that shows the detail records and select Section Expert.  Is the Suppress or "Suppress Blank Section" option checked?  If you click the formula (X+2) button beside each of those options, is there anything there?

 You could also go to Report > "Selection Formulas" > Group and see if there is anything there.

 James
0
 

Author Comment

by:Datakat
ID: 24454478
I did not realize that Crystal Reports can create a Group Select formula without direct input from the human report writer!!  Learning experience, and thanks for pointing me in the right direction.  Problem solved.  The group selection (for whatever reason) was selecting the date range for current year so I just or'd in the formulas to calculate the dates for last year and all is well!!
0
 
LVL 35

Expert Comment

by:James0628
ID: 24456080
Well, someone/something had to put the formula there.  CR won't just do it on its own.  If you didn't do it, then someone else must have.  The obvious guess is that someone wanted the report to include the last year sales, but not actually show the details on the report.

 FWIW, if the report is only supposed to include records within a certain date range for this year and last year, that selection should be in the record selection.  If it is, and you want to see both, you can just remove the group selection.  The record selection will limit the records included in the report.  The group selection was simply to suppress the records from last year, so that they didn't show.  If you want to see them too, you can simply remove the group selection formula (rather than add the dates from last year to the selection).  FWIW, I think it'd be "cleaner" to remove the selection formula if you don't need it anymore, rather than modify it to include everything.  If you leave the formula, you may run into this same situation somewhere down the line (where you can't figure out why the report isn't showing some records).  If you like, instead of deleting the lines in the formula, you could comment them out (put // in front of each line).  That way they won't actually do anything, but they'll still be around for reference.


 Anyway, glad I could help.

 James
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

707 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