Hi
I am working in a company who have a database that uses report html templates that use code to withdraw data from the database. In the HTML template the code below is used.
What I cannot work out is the area below which creates part of the report SampleMaterialRiskBand and SamplePrisorityRiskBand. I cannot find these fileds in the table TableSamples at all.
It displays for example 3 for SampleMaterialRisk and gives a SampleMaterialRiskBand as 'Very Low', I need to change the RiskBands but cannot find them in the table. As anyone any idea of what it is doing and where I can find the SampleMaterialRiskBand. Thanks
TableSamples.SampleMaterialRisk, MaterialRiskString(TableSamples.SampleMaterialRisk) As SampleMaterialRiskBand, TableSamples.SamplePriorityRisk, PriorityRiskString(TableSamples.SamplePriorityRisk) As SamplePriorityRiskBand
{# UseFile report.css #} {# LoadQuery SELECT TableSamples.SampleID, GetSampleRefFromID(TableSamples.SampleID) As SampleRef, TableSamples.SampleDate, VListAreas.ItemValue As SampleArea, VListFloors.ItemValue As SampleFloor, TableSamples.SampleRoom, VListComponents.ItemValue As SampleComponent, TableSamples.SampleSurveyType, ListAsbestosType.Description As SampleAsbestosType, nz(ListAnalysis.Description,"NADIS") As SampleAnalysis, nz(ListCondition.Description,"NADIS") As SampleCondition, nz(ListFriability.Description,"NADIS") As SampleFriability, nz(ListPosition.Description,"NADIS") As SamplePosition, nz(ListTreatment.Description,"NADIS") As SampleTreatment, TableSamples.SampleMaterialRisk, MaterialRiskString(TableSamples.SampleMaterialRisk) As SampleMaterialRiskBand, TableSamples.SamplePriorityRisk, PriorityRiskString(TableSamples.SamplePriorityRisk) As SamplePriorityRiskBand, TableSamples.SampleRecommendations, VListLabs.ItemValue As SampleLab, VListRemovalCosts.ItemValue As SampleRemovalCost, VListNextInspectionDates.ItemValue As SampleNextInspectionDate, VListActions.ItemValue As SampleAction, TableSamples.SamplePhotoID, TableSites.SiteSurveyorsName As SampleSurveyorsName FROM (((((((((((((TableSamples LEFT JOIN VListAreas ON TableSamples.SampleAreaID=VListAreas.ID) LEFT JOIN VListFloors ON TableSamples.SampleFloorID=VListFloors.ID) LEFT JOIN VListComponents ON TableSamples.SampleComponentID=VListComponents.ID) LEFT JOIN ListAsbestosType ON TableSamples.SampleAsbestosTypeID=ListAsbestosType.ID) LEFT JOIN ListAnalysis ON TableSamples.SampleAnalysisID=ListAnalysis.ID) LEFT JOIN ListCondition ON TableSamples.SampleConditionID=ListCondition.ID) LEFT JOIN ListFriability ON TableSamples.SampleFriabilityID=ListFriability.ID) LEFT JOIN ListPosition ON TableSamples.SamplePositionID=ListPosition.ID) LEFT JOIN ListTreatment ON TableSamples.SampleTreatmentID=ListTreatment.ID) LEFT JOIN VListLabs ON TableSamples.SampleLabID=VListLabs.ID) LEFT JOIN VListRemovalCosts ON TableSamples.SampleRemovalCostID=VListRemovalCosts.ID) LEFT JOIN VListNextInspectionDates ON TableSamples.SampleNextInspectionDateID=VListNextInspectionDates.ID) LEFT JOIN VListActions ON TableSamples.SampleActionID=VListActions.ID) LEFT JOIN TableSites ON TableSamples.SampleSiteID=TableSites.SiteID WHERE TableSamples.SampleSiteID={!SiteID!} ORDER BY TableSamples.SampleID #} {# ForEachRecord #} {# IfNotFirstRecord #}
I am working in a company who have a database that uses report html templates that use code to withdraw data from the database. In the HTML template the code below is used.
What I cannot work out is the area below which creates part of the report SampleMaterialRiskBand and SamplePrisorityRiskBand. I cannot find these fileds in the table TableSamples at all.
It displays for example 3 for SampleMaterialRisk and gives a SampleMaterialRiskBand as 'Very Low', I need to change the RiskBands but cannot find them in the table. As anyone any idea of what it is doing and where I can find the SampleMaterialRiskBand. Thanks
TableSamples.SampleMaterialRisk, MaterialRiskString(TableSamples.SampleMaterialRisk) As SampleMaterialRiskBand, TableSamples.SamplePriorityRisk, PriorityRiskString(TableSamples.SamplePriorityRisk) As SamplePriorityRiskBand
{# UseFile report.css #} {# LoadQuery SELECT TableSamples.SampleID, GetSampleRefFromID(TableSamples.SampleID) As SampleRef, TableSamples.SampleDate, VListAreas.ItemValue As SampleArea, VListFloors.ItemValue As SampleFloor, TableSamples.SampleRoom, VListComponents.ItemValue As SampleComponent, TableSamples.SampleSurveyType, ListAsbestosType.Description As SampleAsbestosType, nz(ListAnalysis.Description,"NADIS") As SampleAnalysis, nz(ListCondition.Description,"NADIS") As SampleCondition, nz(ListFriability.Description,"NADIS") As SampleFriability, nz(ListPosition.Description,"NADIS") As SamplePosition, nz(ListTreatment.Description,"NADIS") As SampleTreatment, TableSamples.SampleMaterialRisk, MaterialRiskString(TableSamples.SampleMaterialRisk) As SampleMaterialRiskBand, TableSamples.SamplePriorityRisk, PriorityRiskString(TableSamples.SamplePriorityRisk) As SamplePriorityRiskBand, TableSamples.SampleRecommendations, VListLabs.ItemValue As SampleLab, VListRemovalCosts.ItemValue As SampleRemovalCost, VListNextInspectionDates.ItemValue As SampleNextInspectionDate, VListActions.ItemValue As SampleAction, TableSamples.SamplePhotoID, TableSites.SiteSurveyorsName As SampleSurveyorsName FROM (((((((((((((TableSamples LEFT JOIN VListAreas ON TableSamples.SampleAreaID=VListAreas.ID) LEFT JOIN VListFloors ON TableSamples.SampleFloorID=VListFloors.ID) LEFT JOIN VListComponents ON TableSamples.SampleComponentID=VListComponents.ID) LEFT JOIN ListAsbestosType ON TableSamples.SampleAsbestosTypeID=ListAsbestosType.ID) LEFT JOIN ListAnalysis ON TableSamples.SampleAnalysisID=ListAnalysis.ID) LEFT JOIN ListCondition ON TableSamples.SampleConditionID=ListCondition.ID) LEFT JOIN ListFriability ON TableSamples.SampleFriabilityID=ListFriability.ID) LEFT JOIN ListPosition ON TableSamples.SamplePositionID=ListPosition.ID) LEFT JOIN ListTreatment ON TableSamples.SampleTreatmentID=ListTreatment.ID) LEFT JOIN VListLabs ON TableSamples.SampleLabID=VListLabs.ID) LEFT JOIN VListRemovalCosts ON TableSamples.SampleRemovalCostID=VListRemovalCosts.ID) LEFT JOIN VListNextInspectionDates ON TableSamples.SampleNextInspectionDateID=VListNextInspectionDates.ID) LEFT JOIN VListActions ON TableSamples.SampleActionID=VListActions.ID) LEFT JOIN TableSites ON TableSamples.SampleSiteID=TableSites.SiteID WHERE TableSamples.SampleSiteID={!SiteID!} ORDER BY TableSamples.SampleID #} {# ForEachRecord #} {# IfNotFirstRecord #}