I have been searching the forum for references to my issue but only find references for graphics which are located outside of a database i.e. d:\something\graphic.bmp. My issue is concerning printing graphics which have been imported into a table in reports. I don't think the location of the graphic is as much as an issue as the logic to print it or not.
Out data set looks like this:
WorkOrder - Parent
Location - Child - 1 to 1 link on CompanyID
Items - Child - 1 to many link on WorkOrder_Number
The location table contains things like
CompanyID C
CompanyName C
CompanyAddress C
CompanyPhone C
Logo (Bitmap - Company imported bitmap)
NoLogo (Bitmap - Blank imported bitmap)
So far pretty simple.
Our company has 3 locations. The basics are that each company has it's own logo. These logos print out in the report headers based on the CompanyID. That part works fine.
The wrench in the spokes is that we do work for a number of third parties at each of our locations. The paperwork must not contain our name, address or logo for any third party work order. I have been able to use calculated fields to handle either printing or not printing the name and address, etc. based on a value in the ThirdParty field of the WorkOrder.
if(WorkOrder->ThirdParty=.T.,"",location->CompanyName) etc.
This works fine with character and numeric fields although the "" would be a 0 for a numeric field but I can't get it to work with a graphic field. I have tried
if(WorkOrder->ThirdParty=.T.,location->NoLogo,location->Logo) this produces no output whatsoever. I have even tried if then else in a RichText field but the RichText field will not even accept the Logo field.
I know I can create another set of reports which would not contain the logo at all and print those based on the value of ThirdParty but that means maintaining an entire additional set of reports which I'd rather not do.
Does anyone know of a way to do this by harnessing the power and logic of Alpha5?
Scott
Out data set looks like this:
WorkOrder - Parent
Location - Child - 1 to 1 link on CompanyID
Items - Child - 1 to many link on WorkOrder_Number
The location table contains things like
CompanyID C
CompanyName C
CompanyAddress C
CompanyPhone C
Logo (Bitmap - Company imported bitmap)
NoLogo (Bitmap - Blank imported bitmap)
So far pretty simple.
Our company has 3 locations. The basics are that each company has it's own logo. These logos print out in the report headers based on the CompanyID. That part works fine.
The wrench in the spokes is that we do work for a number of third parties at each of our locations. The paperwork must not contain our name, address or logo for any third party work order. I have been able to use calculated fields to handle either printing or not printing the name and address, etc. based on a value in the ThirdParty field of the WorkOrder.
if(WorkOrder->ThirdParty=.T.,"",location->CompanyName) etc.
This works fine with character and numeric fields although the "" would be a 0 for a numeric field but I can't get it to work with a graphic field. I have tried
if(WorkOrder->ThirdParty=.T.,location->NoLogo,location->Logo) this produces no output whatsoever. I have even tried if then else in a RichText field but the RichText field will not even accept the Logo field.
I know I can create another set of reports which would not contain the logo at all and print those based on the value of ThirdParty but that means maintaining an entire additional set of reports which I'd rather not do.
Does anyone know of a way to do this by harnessing the power and logic of Alpha5?
Scott
Comment