javascript
Does anyone use javascript in their reports? I would be interested in seeing a snippet of code. I've had luck using C++ but I don't know the language so I can't get very far. For some reason js won't do anything, not even an alert box.
This is where I'm at. Please excuse the formatting, the editor makes formatting burdonsome:
<!DOCTYPE html>
<html>
<body>
<script>
import "unit1.js", "unit2.js" // What are we importing? The FR guide glosses over this very quickly and doesn't offer really any help.
// Revision variable is the 3rd field down
// Cost variable is the rectangle cost created by sigmanest
function Cost() {
var revision = <WO-PartDetail."RevisionNo">;
var cost = <WO-PartDetail."PartUnitPriceRect">;
var PartCost;
// If the revision field is NOT empty
if (revision != null) {
PartCost = <WO-PartDetail."RevisionNo">;
// If the revision field is empty, the rectangle price will be used
} else {
PartCost = <WO-PartDetail."PartUnitPriceRect">;
}
}
</script>
</body>
</html>
This is where I'm at. Please excuse the formatting, the editor makes formatting burdonsome:
<!DOCTYPE html>
<html>
<body>
<script>
import "unit1.js", "unit2.js" // What are we importing? The FR guide glosses over this very quickly and doesn't offer really any help.
// Revision variable is the 3rd field down
// Cost variable is the rectangle cost created by sigmanest
function Cost() {
var revision = <WO-PartDetail."RevisionNo">;
var cost = <WO-PartDetail."PartUnitPriceRect">;
var PartCost;
// If the revision field is NOT empty
if (revision != null) {
PartCost = <WO-PartDetail."RevisionNo">;
// If the revision field is empty, the rectangle price will be used
} else {
PartCost = <WO-PartDetail."PartUnitPriceRect">;
}
}
</script>
</body>
</html>
Comments
Thank you for taking the time to reply. Unfortunately this code doesn't do anything on this end. Are script/html tags required...or is that all of the code needed? Does something have to be put onto the page tab to make it run code? I've even tried the 'hello world' tutorial directly from the documentation (in C...they bailed on Javascript after the first paragraph) and it won't work. There has to be an on switch somewhere(?)