?
Solved

previos month value in Crystal Report

Posted on 2008-10-23
5
Medium Priority
?
233 Views
Last Modified: 2012-06-27
Hello

I have got a crystal report looking as follow

Grouplevel                             Revenue | Margin
GH1 Country        
GH2 Customer (drill)

The user selects a specific month as parameter.

So I now want to ad a column showing the revenue of last month.
I already managed to get this partially work, using shared variables. In the data selection i select the current month as well as the previous month and then I added a group "month". With the shared variables I pulled the last months values and displayed them at the country group for the current month. My problem comes with the drill functionality. If I drill down to the customer level, I loose the previous month value on the country group, which is logical to me because the drill creates a new SQL-query specifically for the current month. So there can be no value. I am looking for hours to find a solution for this, but could not find anything appropriate. Using additional data sources as described  in other solutions is not an option because I am working on Business-Views, which make this difficult.

I am looking forward to hearing from you
0
Comment
Question by:mschmitz
[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
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 22792052
Try this idea.

Add 2 formulas
PreviousMonth
If {DateField} In LastFullMonth then
    {RevenueField}
else
     0

Similarly for the current month

You can then use those formulas to get your summaries for the country and you don't need to group by the date.

mlmcc
0
 

Author Comment

by:mschmitz
ID: 22794130
Yep, I had such an Idea as well,
but as my report gets bigger (more columns), I would need to create a formula for each column on each group level (otherwise the grouping will not be done on the server).
I will create reports like that using more than 10 columns, so this will result in much formulas which is not very good for maintenance.
Do you have any other ideas?
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 22796430
The only other way I can think of would be to use a subreport to get the previous month data but not sure what happens when you drill in.

mlmcc
0
 

Author Closing Comment

by:mschmitz
ID: 31509457
Not what I was looking for but thanks for the help
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

771 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