Applicable Versions: 4.05.0084 and above


"How can I get the URL for a dashboard, report or query published to DataPA Enterprise so I can use it in my own web application?" describes how to obtain a URL to open a report published to DataPA Enterprise directly in the browser or an iframe. By default, this will open the report viewer exactly as it would appear in DataPA Enterprise. That is, if the report or query has been run previously, the last copy of the report or query will be shown, along with the header containing the run button. The steps below describe how you can modify this behavior to suit your needs. 


Forcing the report or query to be refreshed.
You can force the report or query to be refreshed before it is opened using the value pair refresh=true. For instance to force a report or query to be refreshed I might use the URL;


http://localhost/DataPA/Document.aspx?ID=2AECA0C79A974D86B005F2CC57D58A49&autoLogin=True&username=Nick&password=password&refresh=true


or the following form;


<form action=""http://localhost/DataPA/Document.aspx"">
<input type=""hidden"" name=""ID"" value=""2AECA0C79A974D86B005F2CC57D58A49"">
<input type=""hidden"" name=""autoLogin"" value=""true"">
<input type=""hidden"" name=""username"" value=""Nick"">
<input type=""hidden"" name=""password"" value=""password"">
<input type=""submit"" name=""Submit"" value=""run report"">
<input type=""hidden"" name=""refresh"" value=""true"">
</form>


Providing connection and parameter details.
If you use the refresh value pair to cause the report to be refreshed on open, the user will still be prompted to specify the connection the report or query should be run against, and any input parameters. You can provide the connection using the connection value pair, and any query parameters using a value pair with the Required Value Name (label) of the query required field. For instance, if my report or query should be run against a connection called localhost passing the value France to a required field with the required value name Country I would use the following URL;


http://localhost/DataPA/Document.aspx?ID=2AECA0C79A974D86B005F2CC57D58A49&autoLogin=True&username=Nick&password=password&refresh=true&Connection=localhost&Country=France

or the following form;


<form action=""http://localhost/DataPA/Document.aspx"">
<input type=""hidden"" name=""ID"" value=""2AECA0C79A974D86B005F2CC57D58A49"">
<input type=""hidden"" name=""noheader"" value=""true"">
<input type=""hidden"" name=""refresh"" value=""true"">
<input type=""hidden"" name=""autoLogin"" value=""true"">
<input type=""hidden"" name=""username"" value=""Nick"">
<input type=""hidden"" name=""password"" value=""password"">
<input type=""hidden"" name=""connection"" value=""localhost"">
<input type=""hidden"" name=""Country"" value=""France"">
<input type=""submit"" name=""Submit"" value=""run report"">
</form>


NB. To pass date parameters, the value should be in the form Date(MM,DD,YY)


Hiding the header.
You can hide the header section of the report or query display with the value pair noheader=true. For instance, to hide the header in our example above, we would use the following URL;


http://localhost/DataPA/Document.aspx?ID=2AECA0C79A974D86B005F2CC57D58A49&autoLogin=True&username=Nick&password=password&refresh=true&Connection=localhost&Country=France&noheader=true


or the following form;


<form action=""http://localhost/DataPA/Document.aspx"">
<input type=""hidden"" name=""ID"" value=""2AECA0C79A974D86B005F2CC57D58A49"">
<input type=""hidden"" name=""noheader"" value=""true"">
<input type=""hidden"" name=""refresh"" value=""true"">
<input type=""hidden"" name=""autoLogin"" value=""true"">
<input type=""hidden"" name=""username"" value=""Nick"">
<input type=""hidden"" name=""password"" value=""password"">
<input type=""hidden"" name=""connection"" value=""localhost"">
<input type=""hidden"" name=""Country"" value=""France"">
<input type=""submit"" name=""Submit"" value=""run report"">
</form>