47c857aa2b1cc999acc1480d10b8fd5a17729a2d
API/CodeSamples/ReportViewer/Custom-Export-Buttons.md
| ... | ... | @@ -1 +1,11 @@ |
| 1 | -Re-purpose this page. |
|
| ... | ... | \ No newline at end of file |
| 0 | +#Creating a Custom Export Button |
|
| 1 | + |
|
| 2 | +[[_TOC_]] |
|
| 3 | + |
|
| 4 | +##Method |
|
| 5 | + |
|
| 6 | +This code sample will allow you to place your own export buttons wherever you need them on your report viewer. This button uses our built-in PDF icon and is set to export to pdf. However, you can change but the **"src"** and **"&output=pdf"** properties to match whatever image and export type you wish to use, respectively. |
|
| 7 | + |
|
| 8 | +```csharp |
|
| 9 | +<img src="rs.aspx?image=pdf.gif" onclick="window.location='<%=string.Format("{0}?{1}&output=pdf",Request.ServerVariables["PATH_INFO"],Request.ServerVariables"QUERY_STRING"])%>'" |
|
| 10 | +``` |
|
| ... | ... | \ No newline at end of file |