or
| void ExportToPDF(Telerik.Reporting.Report reportToExport) |
| { |
| ReportProcessor reportProcessor = new ReportProcessor(); |
| RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null); |
| string fileName = result.DocumentName + ".pdf"; |
| Response.Clear(); |
| Response.ContentType = result.MimeType; |
| Response.Cache.SetCacheability(HttpCacheability.Private); |
| Response.Expires = -1; |
| Response.Buffer = true; |
| Response.AddHeader("Content-Disposition", |
| string.Format("{0};FileName=\"{1}\"", |
| "attachment", |
| fileName)); |
| Response.BinaryWrite(result.DocumentBytes); |
| Response.End(); |
| } |
<telerik:ReportViewer Report="{Binding Report}"
Grid.Column="1"/>
I'm going the Telerik Reporting learning guide. On page 55, step #9, the following query is referenced:
| SELECT top 20 |
| Production.Product.NAME, |
| Production.WorkOrder.StockedQty, |
| Production.WorkOrder.ScrappedQty, |
| Production.WorkOrder.OrderQty |
| FROM |
| Production.Product |
| INNER JOIN |
| Production.WorkOrder ON Production.Product.ProductID = Production.WorkOrder.ProductID |
| WHERE Production.WorkOrder.ScrappedQty > 0 |
However when I execute that query, I'm getting the following error:
| Invalid column name 'NAME'. |
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">