I have a marketing promotion for a customer that I need help with. If the
field has a c in it I need the CD Page, a d needs the dvd page, and any
other number gets the default form if it exists, if not then return an
error in a report and give a error pdf.
Example 12345, 12345c, 12345d
12345 gets the default
12345c gets cd page
12345d gets dvd page
67890 gets error page plus gives an error in log.
var GiveAway = CreateResource (Field("PRIZE") + ".pdf", "graphic", true);
switch (Right(Field("PRIZE"), 1))
{
case "c":
FusionPro.Composition.SetBodyPageUsage("CD", true);
case "d":
FusionPro.Composition.SetBodyPageUsage("DVD", true);
//default:
//return GiveAway;
}
if (GiveAway.exists)
return GiveAway;
else
{
return new FusionProResource("NoImage.pdf", "graphic");
ReportWarning ("Image for " + Field ("PRIZE") + "not found");
}
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the recipient.
Our privacy policy is posted on www.printplanet.com
--