Community
Showing results for 
Search instead for 
Do you mean 
Reply

Report Scripting reference

Nickel Elite Contributor
Posts: 508
Country: USA

Report Scripting reference

Is there a document anywhere that outlines what is possible with report scripting.  I have opened some and looked at the VBScript, but the thing is, I really don't even know what can be done.  Thanks...
Richard Brust
ACT! Certified Consultant
richard@rbrDataSolutions.com
Astute Commentator
Posts: 17
Country: USA

Re: Report Scripting reference

Such a reference would be excellent.

 

Although the VBScript link shows possible keywords for coding in vbscript, I know that ACT will only allow some of these; which ones?

 

In particular, what are the properties or attributes that can be changed for a field in a contact report?

I know you can set Field1.text and Field1.visible, etc. What is the full list of attributes that a user can change in the report script? And ideally, what are the possible values they can be set to? It would look like:

 

Field

   text                        "any string"

   visible                    {True} -  False

   background color  {transparent} - red - blue - yellow OR [1 0 0] - [0 0 1] - [1 1 0]  >>I'm not sure what it wants.

   etc......

 

I want to run a service past due report that will essentially highlight certain dates. Each customer has 3 pieces of equipment with 3 service dates associated with them, but if only one piece of equipment has a service date older than today, I want only that date to have a yellow background color (or be bolded or boxed or something to make it stand out from the other dates per customer on the report).

 

Here's the code I have that is NOT working. On Format:

 

If Service1 < PrintDate1 Then

   Service1.backgroundcolor = Yellow

ElseIf Service2 < PrintDate1 Then

   Service2.backgroundcolor = Yellow

Else

   Service1.backgroundcolor = Transparent

   Service2.backgroundcolor = Transparent

EndIf

 

Doesn't work:

If 1 =1 Then

   Service1.backgroundcolor = Yellow

EndIf

 

Doesn't work:

If 1 =1 Then

   Service1.borderstyle = Solid

EndIf

 

Does work:

If 1 = 1 Then

   Service1.visible = False

EndIf

 

I'm not sure if it's my syntax or OnPrint vs OnFormat or what ACT allows/is setup for.  I'm just using trial and error....  :/