A method of setting reference data to an inspection device for automatically inspecting shapes of fillets formed on a substrate by illuminating said substrate using light sources from specified directions to generate an image and using the image of said fillet in said generated image, said method comprising the steps of: preparing, for each of more than one component types, a database registering a plurality of sets of reference data corresponding to mutually different fillet shapes in correlation with heights of solder for forming fillets of corresponding fillet shapes; identifying components and their respective shape to be an object of fillet inspection; and carrying out Step A, Step B, Step C and Step D on each of said identified components; wherein: said Step A is the step of identifying positions and sizes of lands corresponding to identified one of said components; said Step B is the step of setting for each of said lands a target area for inspection of fillets based on the identified positions and sizes of lands; said Step C is the step of obtaining data on the heights of solder for forming the fillets related to the land for which said target area for inspection has been set and reading out reference data corresponding to the data obtained from the reference data registered in said database; and said Step D is the step of registering data required for setting the target area in said Step B and the reference data read out in said Step C in correlation in a memory of said inspection device, wherein design data of said substrate are used in the step of identifying components to be an object of fillet inspection, and said design data include data on the size of opening of mask for solder printing; characterized in that said Step C further includes the steps of reading out from said design data the size of land and the size of said opening of said mask and calculating the height of solder for forming the fillet by dividing the product of an inputted value of thickness of said mask inputted by a user and the size of said opening of said mask by the size of said land, and identifying inspection reference data corresponding to the calculated height. preparing, for each of more than one component types, a database registering a plurality of sets of reference data corresponding to mutually different fillet shapes in correlation with heights of solder for forming fillets of corresponding fillet shapes; identifying components and their respective shape to be an object of fillet inspection; and carrying out Step A, Step B, Step C and Step D on each of said identified components; wherein: said Step A is the step of identifying positions and sizes of lands corresponding to identified one of said components; said Step B is the step of setting for each of said lands a target area for inspection of fillets based on the identified positions and sizes of lands; said Step C is the step of obtaining data on the heights of solder for forming the fillets related to the land for which said target area for inspection has been set and reading out reference data corresponding to the data obtained from the reference data registered in said database; and said Step D is the step of registering data required for setting the target area in said Step B and the reference data read out in said Step C in correlation in a memory of said inspection device,