title: SSRS Microsoft Reporting services - Possible problems during report creation due to user permissions?
body: <p>I'm bumping my head with a strange issue that i'm having while generating reports, this is the scenario:</p>
  
  <p>Created a report with two image inside and both are "external" links with two different parameters (img01 and img02 both text) that point to the image location on the SSRS database like this:</p>
  
  <p>img01 - /images/img01.jpg
  <br>
  img02 - /documents/images/img02.jpg</p>
  
  <p>For the parameter img01 is definded a default value containing the "link", for the img02 the image path is required every time the report is executed.</p>
  
  <p>The idea is to invoke via a stored procedure (xp_cmdshell) the rs.exe command with a .rss config file for rendering the report as a .pdf, which is not a problem since I already have all the info on this part.</p>
  
  <p>What's happening...</p>
  
  <p>a. if i execute the report via browser (ssrs interface so without automatic rendering) there are no problem both images are displayed and if I insert a wrong path for the img02 the small red "X" apperas</p>
  
  <p>b. if i take the string generated from the stored procedure that invoke the rs.exe command and i launch it in a CMD shell, the report is generated in a .pdf file, both images are displayed and if I insert a wrong path for the img02 the small red "X" apperas</p>
  
  <p>c. i launch my stored procedure so now xp_cmdshell is in charge of running the rs.exe command, at this point the report is generated in a .pdf file but only the img01 (the one with the "default link") is visible; img02 either if the path is correct or it isn't I always have the red "X"</p>
  
  <pre><code>-- command used
  set @cmd = 'rs.exe -i C:\try.rss -s http://url/reportserver -v img02=' + @img02 + ' -e Exec2005 -l 600'
  insert @output (output) exec @rc = &lt;database&gt;..xp_cmdshell @cmd
  </code></pre>
  
  <p><em>[TO BE PRECISE the full sequence of point C is the following <br>
  1- php page that connects to the database as admin (sa) <br>
  2- call of the stored procedure (rs.exe) <br>
  3- report generation <br>
  I omitted the php part since the outcome is the same either i run the stored from php or directly from management studio.]</em></p>
  
  <p>I tried to change security permissions on "rs.exe" granting full access to "NT SERVICE\MSSQLSERVER" but nothing changed.</p>
  
  <p>I tried to run xp_cmdshell with a "proxy_account" (not sure on this if i did all the thing in a correct way, i never played with this kind of things and all the "how-to" seems a little bit sketchy) but nothing changed.</p>
  
  <p>If anyone have any idea on the matter would be really appreciated :) (also if it's a potential security threat, at least i can start from somewhere).</p>
  
  <p>In case you need more details or something in my description feels sketchy please tell me, I will try to be more complete.</p>
  
  <p>Regards,
  F.</p>