it is giving credentials error.
What exactly is the error? Usually the error tells you what account could not connect. From there you can figure out what to do next.
If you are using Windows integrated security then the account the IIS application is running under must have proper authorization in SQL. You can find the IIS account by looking at the application pool that hosts the application. The account is under the Identity column. You can change the identity by right clicking and selecting "Advanced settings...". Maybe you need to use Network Services, an existing service account, or maybe you need to create a service account. It all depends on how your security works.
I think you'll be interested in reading the official documentation.
Specify Credential and Connection Information for Report Data Sources