Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This should open the ‘Import MR Items’ window with the data loaded from the CV data file so you can map the materials from CV to CN and populate the MR.

Using Cabinet Vision 2024+

The 2024 version of CV switched from an Access file to a SQL LocalDB MDF file. The steps are mostly the same with the following changes.

The import type should be changed to: ODBC

A Connection String needs to be added:

Code Block
Provider=SQLNCLI11;Server=(localdb)\cv24;Database=CV-@Filename;Integrated Security=SSPI;

The query needs to be converted from Access SQL to SQL Server syntax, following is a sample

Code Block
languagesql
SELECT
    ROUND(
        CASE
            WHEN CxMaterial.UnitOfIssueID = 1 THEN FLOOR(COUNT([Part ID]) + (COUNT([Part ID]) * (COALESCE([MaterialOverride].[Waste], 0) / 100)) + 0.999999999)
            WHEN CxMaterial.UnitOfIssueID = 2 THEN SUM([Parts].[Length] / 12 + ([Parts].[Length] / 12) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 3 THEN SUM([Area] / 144 + ([Area] / 144) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 4 THEN SUM((([Area] * ([CxExtraBoardInfo].[RoughThickness] / 25.4)) / 144) + (([Area] * ([CxExtraBoardInfo].[RoughThickness] / 25.4)) / 144) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 5 THEN SUM((([Area] / 144) / (CASE WHEN ([CxExtraSizeInfo].[Width] > 0 AND [CxExtraSizeInfo].[Length] > 0) THEN ([CxExtraSizeInfo].[Width] / 25.4) * ([CxExtraSizeInfo].[Length] / 25.4) / 144 ELSE 1 END)) + (([Area] / 144) / (CASE WHEN ([CxExtraSizeInfo].[Width] > 0 AND [CxExtraSizeInfo].[Length] > 0) THEN ([CxExtraSizeInfo].[Width] / 25.4) * ([CxExtraSizeInfo].[Length] / 25.4) / 144 ELSE 1 END)) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 6 THEN SUM([Parts].[Length] * 0.0254 + ([Parts].[Length] * 0.0254) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 7 THEN SUM(([Area] * 0.0254 * 0.0254) + ([Area] * 0.0254 * 0.0254) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 8 THEN SUM((([parts].[Area] * 0.0254 * 0.0254) * (([CxExtraBoardInfo].[RoughThickness] / 25.4) * 0.0254)) + (([parts].[Area] * 0.0254 * 0.0254) * (([CxExtraBoardInfo].[RoughThickness] / 25.4) * 0.0254)) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 9 THEN SUM((([parts].[Area] * 0.0254 * 0.0254) * (([CxExtraBoardInfo].[RoughThickness] / 25.4) * 0.0254)) + (([parts].[Area] * 0.0254 * 0.0254) * (([CxExtraBoardInfo].[RoughThickness] / 25.4) * 0.0254)) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 10 THEN SUM((([Parts].[Width] / 12) * ([Parts].[Length] / 12) * ([CxExtraSizeInfo].[Thickness] / 25.4)) + (([Parts].[Width] / 12) * ([Parts].[Length] / 12) * ([CxExtraSizeInfo].[Thickness] / 25.4)) * (COALESCE([MaterialOverride].[Waste], 0) / 100))
            WHEN CxMaterial.UnitOfIssueID = 11 THEN FLOOR(COUNT([Part ID]) + (COUNT([Part ID]) * (COALESCE([MaterialOverride].[Waste], 0) / 100)) + 0.999999999)
            ELSE CAST(CxMaterial.UnitOfIssueID AS VARCHAR)
        END, 2) AS Qty,
    CxMaterial.Name AS Part,
    NULL AS Color1,
    CASE
        WHEN CHARINDEX('plam', LOWER(CxMaterial.Name)) > 0
             OR CHARINDEX('pl', LOWER(CxMaterial.Name)) > 0
             OR CHARINDEX('p lam', LOWER(CxMaterial.Name)) > 0
             OR CHARINDEX('solid surface', LOWER(CxMaterial.Name)) > 0
        THEN [Job Info].[Job Number]
        ELSE NULL
    END AS Color2,
    NULL AS Modifier, NULL AS Element,
    CASE
        WHEN CxMaterial.UnitOfIssueID = 1 THEN 'Each'
        WHEN CxMaterial.UnitOfIssueID = 2 THEN 'Ft'
        WHEN CxMaterial.UnitOfIssueID = 3 THEN 'SqFt'
        WHEN CxMaterial.UnitOfIssueID = 4 THEN 'BdFt'
        WHEN CxMaterial.UnitOfIssueID = 5 THEN 'Sheet'
        WHEN CxMaterial.UnitOfIssueID = 6 THEN 'M'
        WHEN CxMaterial.UnitOfIssueID = 7 THEN 'SqM'
        WHEN CxMaterial.UnitOfIssueID = 8 THEN 'BdM'
        WHEN CxMaterial.UnitOfIssueID = 9 THEN 'CubM'
        WHEN CxMaterial.UnitOfIssueID = 10 THEN 'CubFt'
        WHEN CxMaterial.UnitOfIssueID = 11 THEN 'Pair'
        ELSE CAST(CxMaterial.UnitOfIssueID AS VARCHAR)
    END AS UOM
FROM Parts
LEFT JOIN CxMaterial ON Parts.[Material ID] = CxMaterial.ID
LEFT JOIN CxExtraBoardInfo ON CxMaterial.ID = CxExtraBoardInfo.MaterialID
LEFT JOIN CxExtraSizeInfo ON CxMaterial.ID = CxExtraSizeInfo.MaterialID
LEFT JOIN MaterialOverride ON CxMaterial.ID = MaterialOverride.MatID
INNER JOIN Cabinets ON Parts.[Cabinet ID] = Cabinets.[Cabinet ID]
INNER JOIN Rooms ON Cabinets.[Room ID] = Rooms.[RoomNumber]
INNER JOIN [Job Info] ON Rooms.[Job ID] = [Job Info].ID
WHERE Parts.BuyOut = 0
GROUP BY CxMaterial.Name, CxMaterial.DefaultCost, COALESCE([MaterialOverride].[Waste], 0) / 100, [CxExtraBoardInfo].[RoughThickness] / 25.4, [CxExtraSizeInfo].[Thickness] / 25.4, CxMaterial.UnitOfIssueID,
         CASE WHEN ([CxExtraSizeInfo].[Width] > 0 AND [CxExtraSizeInfo].[Length] > 0) THEN ([CxExtraSizeInfo].[Width] / 25.4) * ([CxExtraSizeInfo].[Length] / 25.4) / 144 ELSE 1 END,
         CASE
            WHEN CHARINDEX('plam', LOWER(CxMaterial.Name)) > 0
                 OR CHARINDEX('pl', LOWER(CxMaterial.Name)) > 0
                 OR CHARINDEX('p lam', LOWER(CxMaterial.Name)) > 0
                 OR CHARINDEX('solid surface', LOWER(CxMaterial.Name)) > 0
            THEN [Job Info].[Job Number]
            ELSE NULL
        END
UNION ALL
SELECT
    COUNT(Molding.[Molding ID]) AS Qty,
    CxMaterial.Name AS Part,
    NULL AS Color1, NULL AS Color2, NULL AS Modifier, NULL AS Element, 'Molding' AS UOM
FROM Molding
LEFT JOIN CxMaterial ON Molding.[Material ID] = CxMaterial.ID
WHERE Molding.[Std Length] > 0
GROUP BY CxMaterial.Name, CxMaterial.Waste
ORDER BY UOM, Part;