Hot Topic (More than 10 Replies) Report help (Read 1302 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Report help
Feb 5th, 2013 at 1:21am
Print Post Print Post  
Is it possible to program a report to change colors based on dates on printed report?
Like anything after ten days it would print purple and anything after 30 days would print red.
@color(element,tc,bc) seems to work with one color or the other but not both.

Am I missing something?

If (JobType = "Service") And (@ServerDate() >= (CallDate + 10))
     {
           @Color(CallDate,5,15)
           @Color(jobtype,5,15)
           @Color(callnumber,5,15)
           @Color(telephoneno,5,15)
           @Color(companyname,5,15)
           @Color(service_req,5,15)
     }
Else
     {
           @Color(CallDate,0,15)
           @Color(jobtype,0,15)
           @Color(callnumber,0,15)
           @Color(telephoneno,0,15)
           @Color(companyname,0,15)
           @Color(service_req,0,15)
     }
If (JobType = "Service") And (@ServerDate() >= (CallDate + 30))
     {
           @Color(CallDate,4,15)
           @Color(jobtype,4,15)
           @Color(callnumber,4,15)
           @Color(telephoneno,4,15)
           @Color(companyname,4,15)
           @Color(service_req,4,15)
     }      
Else
     {
           @Color(CallDate,0,15)
           @Color(jobtype,0,15)
           @Color(callnumber,0,15)
           @Color(telephoneno,0,15)
           @Color(companyname,0,15)
           @Color(service_req,0,15)
     }

Seems to only work on the later.

Thank you for any advice.

Flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #1 - Feb 5th, 2013 at 2:22pm
Print Post Print Post  
Hi Flip,

Try the following code and let me know if it works for you.

Code
Select All
If (JobType = "Service") And (@ServerDate() >= (CallDate + 10))
     {
           @Color(CallDate,5,15)
           @Color(jobtype,5,15)
           @Color(callnumber,5,15)
           @Color(telephoneno,5,15)
           @Color(companyname,5,15)
           @Color(service_req,5,15)
     }
Else If (JobType = "Service") And (@ServerDate() >= (CallDate + 30))
     {
           @Color(CallDate,4,15)
           @Color(jobtype,4,15)
           @Color(callnumber,4,15)
           @Color(telephoneno,4,15)
           @Color(companyname,4,15)
           @Color(service_req,4,15)
     }
Else
     {
           @Color(CallDate,0,15)
           @Color(jobtype,0,15)
           @Color(callnumber,0,15)
           @Color(telephoneno,0,15)
           @Color(companyname,0,15)
           @Color(service_req,0,15)
     }
 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Report help
Reply #2 - Feb 5th, 2013 at 4:37pm
Print Post Print Post  
Hi Ray!

Tried it, Works for the CallDate + 10 but not the + 30
I think I tried this before on one of my many attempts, the best I can get is one execution. 
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #3 - Feb 5th, 2013 at 4:59pm
Print Post Print Post  
Hi Flip,

Whoops Sorry about that, Had the conditions reversed. The 30 days old has to come before the 10 days old.

Code
Select All
If (JobType = "Service") And (@ServerDate() >= (CallDate + 30))
     {
           @Color(CallDate,4,15)
           @Color(jobtype,4,15)
           @Color(callnumber,4,15)
           @Color(telephoneno,4,15)
           @Color(companyname,4,15)
           @Color(service_req,4,15)
     }
Else If (JobType = "Service") And (@ServerDate() >= (CallDate + 10))
     {
           @Color(CallDate,5,15)
           @Color(jobtype,5,15)
           @Color(callnumber,5,15)
           @Color(telephoneno,5,15)
           @Color(companyname,5,15)
           @Color(service_req,5,15)
     }
Else
     {
           @Color(CallDate,0,15)
           @Color(jobtype,0,15)
           @Color(callnumber,0,15)
           @Color(telephoneno,0,15)
           @Color(companyname,0,15)
           @Color(service_req,0,15)
     }
  



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Report help
Reply #4 - Feb 5th, 2013 at 9:16pm
Print Post Print Post  
No change. The +10 is working not the +30

anything +10 and older including the +30 is purple......

I am trying to do a similar kind of thing on another report that I would like to hide any column if the results are zero. It too fails, only executing on one but not the others.....
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #5 - Feb 5th, 2013 at 10:09pm
Print Post Print Post  
hmm... Can you shoot me over the DSR and DDT files attached to an email to support@lantica.com so that I can take a look at them here flip? Just be sure to include which report it is and usernames and passwords if there are any.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Report help
Reply #6 - Feb 6th, 2013 at 4:44pm
Print Post Print Post  
Ray,

Thank you for you help! It is working great.
Clashing code never seems to work well.
Also the heads up with Global code and On print advice from you is helpful. I will be able to use it on other applications as well.


Again, my best to you.
flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #7 - Feb 6th, 2013 at 6:42pm
Print Post Print Post  
Not a problem Flip, glad to give you a hand whenever you need it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Report help
Reply #8 - Feb 6th, 2013 at 11:07pm
Print Post Print Post  
Okay if your offering  Grin

I'm also looking to make a report column disappear if there is no data in it.
Something Like....
If (ReportElementSum <> 0) Then
       {
            Visibility(ReportElement1, 0)
            Visibility(ReportElement2, 0)
            Visibility(ReportElement3, 0)
            Visibility(ReportElement4, 0)
         }
Located in the ReportElementSum on print
But not this because it does not work...
....and there is no other code on the report, and I double checked.
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #9 - Feb 7th, 2013 at 3:23pm
Print Post Print Post  
Hello Flip,

Column or Row of Data?

Which report is this in so I can have a look at the design of the report and see how it's laid out?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #10 - Feb 8th, 2013 at 6:13pm
Print Post Print Post  
Hi Flip,

Sent you back a sample. Hiding entire rows is kinda tricky as by the time you total everything to see that it's zero and want to hide it, it's already printed in the report. The trick is to make the report have multiple views. The first one is invisible but has the money values and sums them. This means that when the 2nd view goes to actually create the report the user sees, we know which columns are going to total zero so we know to hide them.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Report help
Reply #11 - Feb 11th, 2013 at 7:07pm
Print Post Print Post  
Hi Ray,

Seen how you did it, and understand how its done. I was hung up at first about the multiple views, But after reading up about Free Form reports it cleared it all up!. It works fantastic!

THANK YOU again!
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report help
Reply #12 - Feb 11th, 2013 at 9:38pm
Print Post Print Post  
You are welcome, Flip.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged