admin 8/21/2014 | |
You are trying to use PHP examples in ASPRunnerPro. Needless to say it won't work. |
M
|
Maurits 8/22/2014 |
I am using ASPRunner Pro Enterprise Edition Version 8.1 Build 21342. I have searched and read the ASPRunner manual and have search the forum for what I want. I have a table with a field "Company". Depending on the Company I want the row to display a certain color. For Example if the Company is Sears I want the row to show blue....if the company is Walmart I want the row to show Green. I see that the best place for this to occur is to place the coding in the Event section under the List After Record Processed area. I can successfully change the color of all rows with this code: row("rowstyle")="style='background:yellow'" But when I try to place any conditional formatting using an example from one of the forum searches such as: if ($data["Company"]=="Walmart") $row["rowstyle"]='style="background:blue"'; else $row["rowstyle"]='style="background:pink"'; it gives a "Microsoft VBScript compliation error: Invalid character in line 2". It does not matter what code I put in the function area, if there is a second line it always gives this error. If I use the one line to change all rows color it works fine. I have read on the reasons and there were two main ones. I have checked for the main reasons and have physically retyped the statement in the format window. It is always the same error. Any help would be appreciated. Joe
|
|
1312 8/22/2014 |
Try deleting the character ; at the end of the line
|
M
|
Maurits 8/22/2014 |
It looks to me you confuse PHP with ASP |
|
1312 8/23/2014 |
It looks to me you confuse PHP with ASP ASP should be: if data("Profitability") < 0 then row("rowstyle")="style='background:yellow'" end if PHP: if ($data["Profitability"] < 0) $row["rowstyle"]='style="background:yellow"';
|
admin 8/24/2014 | |
Joe, If data("Company") = "Lowes" then |
|
1312 8/24/2014 |
Joe, you need to learn the basics of ASP. In ASP strings must be quoted: If data("Company") = "Lowes" then
|
G
|
gonzalosb 8/24/2014 |
hi Tman,
|
|
1312 8/24/2014 |
hi Tman, try to use separated " IF " functions without " ELSE ". you can do it in 2 ways:
|
G
|
gonzalosb 8/25/2014 |
Glad I can help |