Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005-2015 : Writing Code
Message Icon Topic: Year Title Change Post Reply Post New Topic
Author Message
cardpogi
Newbie
Newbie
Avatar

Joined: 07 Aug 2008
Location: Dominican Republic
Online Status: Offline
Posts: 20
Quote cardpogi Replybullet Topic: Year Title Change
    Posted: 07 Aug 2008 at 6:34am
Well basically whats happening to me is that im trying to make a formula where it can change the report Title each year.This is my formula
IF Year (CurrentDate) = {MENSAJE_ANNO.ANNO}THEN
{MENSAJE_ANNO.DESCRIPCION}, where Mensaje_ANNO.ANNO save the year in an INT FORMAT, and MENSAJE_ANNO_DESCRIPCION is the new title, the point is the formula is working but for some od reason it duplicate everything in the detail of my report. you can download the project here, if anyony could please help.I need it for work and its killing me...
IP IP Logged
cardpogi
Newbie
Newbie
Avatar

Joined: 07 Aug 2008
Location: Dominican Republic
Online Status: Offline
Posts: 20
Quote cardpogi Replybullet Posted: 07 Aug 2008 at 9:25am
if i could get a reply i would really appreciate
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 08 Aug 2008 at 11:48am
I just tried looking at your web page using the link, it says it does not exist.
 
Regards
 
John W.
IP IP Logged
cardpogi
Newbie
Newbie
Avatar

Joined: 07 Aug 2008
Location: Dominican Republic
Online Status: Offline
Posts: 20
Quote cardpogi Replybullet Posted: 09 Aug 2008 at 4:47am
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 09 Aug 2008 at 9:54am
I looked at your report. Since I dont have the database to run against I cannot give a you a solution that I know will work. I did create the following formula against the sample database for CR.
 
This formula works to compare a datebase field  to value (this could be another database field and then then return a year. This again could be value parsed from another datafield source. If the comparision fails it then returns the year from the current system date.
 
If I have understood your problem correctly, the formula should give you the path to a possible solution. On the surface I looked at your formula and I cannot tell you why it did not work. There is a space between the Year and CurrentDate field. Perhaps that is the problem. Anyway I hope what follows will help your sort it out. Let us know either way.
 
-------------------------------------------------------------
If Year({Command.Statement Date}) = 2003 then "2003"
else
ToText(Year(CurrentDate),0,"")
---------------------------------------------
 
Regards,
John W.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.