A search for the Ξcc++ baryon through the Ξcc++→D+pK−π+ decay is performed with a data sample corresponding to an integrated luminosity of 1.7 fb−1 recorded by the LHCb experiment in pp collisions at a centre-of-mass energy of 13 TeV. No significant signal is observed in the mass range from the kinematic threshold of the decay to 3800 MeV/c2. An upper limit is set on the ratio of branching fractions R=B(Ξcc++→Λc+K−π+π+)B(Ξcc++→D+pK−π+) with R<1.7(2.1)×10−2 at the 90% (95%) confidence level at the known mass of the Ξcc++ state.