To qualify for a civil registration number (CPR number) when you move to Denmark, you must meet a number of requirements. When you move to Denmark, it is municipality of residence that is responsible for assigning a CPR number to you.
It is not possible to be registered in the CPR as a resident of Denmark before you have actually moved to Denmark. This means you cannot be assigned a CPR number before you arrive in Denmark, even if you need a CPR number to open a bank account, apply for a state educational grant (SU), a dorm room or to enrol in school and daycare etc.
If you have received your residence permit before you enter Denmark, you can be registered in the CPR as a resident of Denmark from the date of your entry if you also have a place to live.
If your residence permit/registration certificate has been issued after you have entered Denmark, you will be registered in the CPR as a resident of Denmark with effect from the date when the residence permit/ registration certificate was issued, see section 22(3) of the Civil Registration System Act.
In order to ensure that you have in fact taken up residence in Denmark, the municipality may require that you report in person to the municipality in order to be registered in the CPR (see section 21(2) of the Civil Registration System Act).
When you have been registered as a resident in the CPR, you will automatically receive a health card (sundhedskort).
If you are not moving to Denmark but are required to pay tax in Denmark
If you do not meet the requirements for being registered as a resident of Denmark, but are required to pay tax in Denmark, you must contact the Danish Tax Agency (Skattestyrelsen) in order to be assigned a civil registration number (CPR number).
If you later move to Denmark and meet the requirements for being registered as a resident of Denmark in the CPR, you will be registered with the civil registration number (CPR number) you received from the Danish Tax Agency.