Hello,
In case you are working with RPTX, then as mentioned in the other post, it cannot be used with AR7.
However, if you are working with AR7 and want to set the datasource at runtime, then you may refer to following documentation links and see if it helps you:
http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/arWLKDocumentWebService.html
http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/arWLKDataSetWebService.html
Let us know if we mis-understood your query or you require any further assistance.
Regards,
Mohita