To be made to state your ethnicity would be seen as a violation of your individual rights to privacy and would be seen as discriminatory and offensive. It's against the constitution to be made to declare your political views, religion, cultural identity (as in class identity and ethnicity etc) and similar matters. Sweden has had a history of registration of national minorities such as the Sami and the Roma who up until not that long ago were the subjects of special legislation (the Sami still are but now to their advantage). There was also a massive scandal a few years ago when it was revealed that the police departments of the region where I live had a secret archive of those of perceived Roma descent to "make it easier to identify criminals".
This is why there are for instance no clear figures on how many Jews there are in Sweden. To make an estimation people use the membership in the different Jewish congregations, Jewish associations, place of birth etc. The same goes for other ethnicities such as the previously mentioned Roma, Syriacs etc.