Search Results

Search found 26 results on 2 pages for 'localreport'.

Page 1/2 | 1 2  | Next Page >

  • LocalReport (WebForms) and Partial Trust, for PDF Generation

    - by Peet Brits
    My goal is to generate a PDF for display in a web page, either as aspx or with a generic handler. (This will link from a Silverlight page, but this is irrelevant to the problem.) The problem is that LocalReport (Microsoft.Reporting.WebForms; Microsoft.ReportViewer.WebForms.dll) requires full trust, and our hosting server does not allow full trust. I am aware that ReportViewer has a remote mode that will allow it to run with partial trust, but for that I need a report server url which should probably have full trust as well, which does not solve anything. So how do I generate PDFs from WebForms in a partially trusted environment?

    Read the article

  • SSRS2008: LocalReport export to HTML / fragment

    - by queen3
    I need local RDL report to be exported to HTML, preferably HTML fragment. In 2005 it wasn't officially supported but there was a trick. In SSRS2008 they seem to drop this support (there's no HTML extension in the supported extensions when enumerating using reflection) and use RPL instead which is a binary format that I doubt someone will be happy to parse. Actually it's doesn't seem to be about HTML at all. Now, is there a way to render HTML using SSRS2008 local report? Notice that I use VS2008 but with reporting assemblies installed from VS2010 Beta 2 reportviewer.

    Read the article

  • Getting the relative path to the rdlc report in my winform app.

    - by Mike Wills
    I am automatically creating a PDF from some of our reports in a month-end process. I am running into a problem where ReportViewer.LocalReport can't find my report. Within the project, the report files are in "(project root folder)/Reports/report.rdlc". How do I set ReportViewer.LocalReport.ReportPath so I can reference my report file? I would rather not set the full path because I don't know where it would be installed when installed on the client machines.

    Read the article

  • Switching DataSources on a ReportViewer in WinForms

    - by Mike Wills
    I have created a winform for the users to view view the many reports I am creating for them. I have a drop down list with the report name which triggers the appropriate fields to display the parameters. Once those are filled, they press Submit and the report appears. This works the first time they hit the screen. They can change the parameters and the ReportViewer works fine. Change to a different report, and the I get the following ReportViewer error: An error occurred during local report processing. An error has occurred during the report processing. A data source instance has not been supplied for the data source "CgTempData_BusMaintenance". As far as the process I use: I set reportName (string) the physical RDLC name. I set the dataSource (string) as the DataSource Name I fill a generic DataTable with the data for the report to run from. Make the ReportViewer visible Set the LocalReport.ReportPath = "Reports\\" = reportName; Clear the LocalReport.DataSources.Clear() Add the new LocalReport.DataSources.Add(new ReportDataSource(dataSource, dt)); RefreshReport() on the ReportViewer. Here is the portion of the code that setups up and displays the ReportViewer: /// <summary> /// Builds the report. /// </summary> private void BuildReport() { DataTable dt = null; ReportingCG rcg = new ReportingCG(); if (reportName == "GasUsedReport.rdlc") { dataSource = "CgTempData_FuelLog"; CgTempData.FuelLogDataTable DtFuelLog = rcg.BuildFuelUsedTable(fromDate, toDate); dt = DtFuelLog; } else if (reportName == "InventoryCost.rdlc") { CgTempData.InventoryUsedDataTable DtInventory; dataSource = "CgTempData_InventoryUsed"; DtInventory = rcg.BuildInventoryUsedTable(fromDate, toDate); dt = DtInventory; } else if (reportName == "VehicleMasterList.rdlc") { dataSource = "CgTempData_VehicleMaster"; CgTempData.VehicleMasterDataTable DtVehicleMaster = rcg.BuildVehicleMasterTable(); dt = DtVehicleMaster; } else if (reportName == "BusCosts.rdlc") { dataSource = "CgTempData_BusMaintenance"; dt = rcg.BuildBusCostsTable(fromDate, toDate); } // Setup the DataSource this.reportViewer1.Visible = true; this.reportViewer1.LocalReport.ReportPath = "Reports\\" + reportName; this.reportViewer1.LocalReport.DataSources.Clear(); this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource(dataSource, dt)); this.reportViewer1.RefreshReport(); } Any ideas how to remove all of the old remaining data? Do I dispose the object and recreate it?

    Read the article

  • Switching DataSources in ReportViewer in WinForms

    - by Mike Wills
    I have created a winform for the users to view view the many reports I am creating for them. I have a drop down list with the report name which triggers the appropriate fields to display the parameters. Once those are filled, they press Submit and the report appears. This works the first time they hit the screen. They can change the parameters and the ReportViewer works fine. Change to a different report, and the I get the following ReportViewer error: An error occurred during local report processing. An error has occurred during the report processing. A data source instance has not been supplied for the data source "CgTempData_BusMaintenance". As far as the process I use: I set reportName (string) the physical RDLC name. I set the dataSource (string) as the DataSource Name I fill a generic DataTable with the data for the report to run from. Make the ReportViewer visible Set the LocalReport.ReportPath = "Reports\\" = reportName; Clear the LocalReport.DataSources.Clear() Add the new LocalReport.DataSources.Add(new ReportDataSource(dataSource, dt)); RefreshReport() on the ReportViewer. Here is the portion of the code that setups up and displays the ReportViewer: /// <summary> /// Builds the report. /// </summary> private void BuildReport() { DataTable dt = null; ReportingCG rcg = new ReportingCG(); if (reportName == "GasUsedReport.rdlc") { dataSource = "CgTempData_FuelLog"; CgTempData.FuelLogDataTable DtFuelLog = rcg.BuildFuelUsedTable(fromDate, toDate); dt = DtFuelLog; } else if (reportName == "InventoryCost.rdlc") { CgTempData.InventoryUsedDataTable DtInventory; dataSource = "CgTempData_InventoryUsed"; DtInventory = rcg.BuildInventoryUsedTable(fromDate, toDate); dt = DtInventory; } else if (reportName == "VehicleMasterList.rdlc") { dataSource = "CgTempData_VehicleMaster"; CgTempData.VehicleMasterDataTable DtVehicleMaster = rcg.BuildVehicleMasterTable(); dt = DtVehicleMaster; } else if (reportName == "BusCosts.rdlc") { dataSource = "CgTempData_BusMaintenance"; dt = rcg.BuildBusCostsTable(fromDate, toDate); } // Setup the DataSource this.reportViewer1.Visible = true; this.reportViewer1.LocalReport.ReportPath = "Reports\\" + reportName; this.reportViewer1.LocalReport.DataSources.Clear(); this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource(dataSource, dt)); this.reportViewer1.RefreshReport(); } Any ideas how to remove all of the old remaining data? Do I dispose the object and recreate it?

    Read the article

  • Error while rendering .rdl file into pdf format

    - by Arka Chatterjee
    Hi, I an generating reports using SQL Server reporting services. I have generated a report and have put .rdl report file in the "E" drive. Now, when I am going to render the .rdl report file into pdf format,I am getting the exception : - "An error occurred during local report processing." The stack trace is follows : - " at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)\r\n at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n at SaltlakeSoft.APEX2.Controllers.TestPageController.RenderReport() in E:\Documents and Settings\Administrator\Desktop\afetbuild15thmayapex2\apex2\Controllers\TestPageController.cs:line 1626\r\n at lambda_method(ExecutionScope , ControllerBase , Object[] )\r\n at System.Web.Mvc.ActionMethodDispatcher.<c_DisplayClass1.b_0(ControllerBase controller, Object[] parameters)\r\n at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)\r\n at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters)\r\n at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)\r\n at System.Web.Mvc.ControllerActionInvoker.<c_DisplayClassa.b_7()\r\n at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)" I am using the following code : - LocalReport report = new LocalReport(); report.ReportPath = @"E:\Report1.rdl"; List employeeCollection = empRepository.FindAll().ToList(); ReportDataSource reportDataSource = new ReportDataSource("dataSource1",employeeCollection); report.DataSources.Clear(); report.DataSources.Add(reportDataSource); report.Refresh(); string reportType = "PDF"; string mimeType; string encoding; string fileNameExtension; string deviceInfo ="" +"PDF" + "8.5in" + "11in" + "0.5in" +"1in" + "1in" +"0.5in" + ""; Warning[] warnings; string[] streams; byte[] renderedBytes; renderedBytes = report.Render(reportType,deviceInfo,out mimeType,out encoding, out fileNameExtension, out streams, out warnings); Response.Clear(); Response.ContentType = mimeType; Response.AddHeader("content-disposition", "attachment; filename=foo." + fileNameExtension); Response.BinaryWrite(renderedBytes); Response.End(); Please help me. Thanks in advance- Arka

    Read the article

  • Switching between multiple reports (.rdlc) in a single report viewer

    - by UserNameHere
    I have 2 reports, "report1.rdlc" and "report2.rdlc" and I want to be able to swap betweent the 2 of them in a single report viewer ("rv_1"). I also have 3 buttons: btn_1 which does: rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report1.rdlc" rv_1.RefreshReport() btn_2 which does: rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report2.rdlc" rv_1.RefreshReport() btn_3 which does: dim rds as new ReportDataSource rds.name = rds.value = rv_1.reset() rv_1.LocalReport.DataSources.add(rds) rv_1.RefreshReport() Now no matter what I put for rds.name and rds.value it leaves me with "A data source instance has not been supplied for the data source 'dataSetName_TableName'. So my question is; what do I need to put there in order to get this to work correctly?

    Read the article

  • Error while rendering report(.rdl).

    - by Sushavon Banerjee
    Hi, I have generated a .rdl report file. Now, when I am going to render the .rdl report file into pdf format,exception is throwing. The exception is : - "An error occurred during local report processing." The stack trace is follows : - " at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)\r\n at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)\r\n at SaltlakeSoft.APEX2.Controllers.TestPageController.RenderReport() in E:\Documents and Settings\Administrator\Desktop\afetbuild15thmayapex2\apex2\Controllers\TestPageController.cs:line 1626\r\n at lambda_method(ExecutionScope , ControllerBase , Object[] )\r\n at System.Web.Mvc.ActionMethodDispatcher.<c_DisplayClass1.b_0(ControllerBase controller, Object[] parameters)\r\n at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)\r\n at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters)\r\n at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)\r\n at System.Web.Mvc.ControllerActionInvoker.<c_DisplayClassa.b_7()\r\n at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)" My code is as follows : - LocalReport report = new LocalReport(); report.ReportPath = @"E:\Report1.rdl"; List<Employee> employeeCollection = empRepository.FindAll().ToList(); ReportDataSource reportDataSource = new ReportDataSource("dataSource1",employeeCollection); report.DataSources.Clear(); report.DataSources.Add(reportDataSource); report.Refresh(); string reportType = "PDF"; string mimeType; string encoding; string fileNameExtension; string deviceInfo ="<DeviceInfo>" +"<OutputFormat>PDF</OutputFormat>" + "<PageWidth>8.5in</PageWidth>" + "<PageHeight>11in</PageHeight>" + "<MarginTop>0.5in</MarginTop>" +"<MarginLeft>1in</MarginLeft>" + "<MarginRight>1in</MarginRight>" +"<MarginBottom>0.5in</MarginBottom>" + "</DeviceInfo>"; Warning[] warnings; string[] streams; byte[] renderedBytes; renderedBytes = report.Render(reportType,deviceInfo,out mimeType,out encoding, out fileNameExtension, out streams, out warnings); Response.Clear(); Response.ContentType = mimeType; Response.AddHeader("content-disposition", "attachment; filename=foo." + fileNameExtension); Response.BinaryWrite(renderedBytes); Response.End(); Help me please... Thanks, Sushavon

    Read the article

  • Microsoft ReportViewer Web Control Requiring a ScriptManager

    - by Maya
    I'm trying to render the report viewer programmatically within a custom Page placed in an IHttpHandler context ReportViewer rv = new ReportViewer(); ReportDataSource rds = new ReportDataSource(); rds.Name = "Report"; rv.LocalReport.ReportPath = "Report.rdlc"; rds.Value = SomeReportObject; rv.LocalReport.DataSources.Add(rds); rv.LocalReport.Refresh(); ScriptManager scriptHandler = new ScriptManager(); MyPage p = new MyPage(); p.Controls.Add(scriptHandler); p.Controls.Add(rv); using (TextWriter myTextWriter = new StringWriter()) { using (HtmlTextWriter myWriter = new HtmlTextWriter(myTextWriter)) { p.RenderControl(myWriter); } } Although I have the ScriptManager added to the page but the runtime complains that the ReportViewer needs one, it throws the following exception at p.RenderControl(myWriter) line The Report Viewer Web Control requires a System.Web.UI.ScriptManager on the web form. And this is the MyPage Class public class MyPage : Page { public override void VerifyRenderingInServerForm(Control control) { //Empty Method } public override bool EnableEventValidation { get { return false; } set { /* Do nothing */} } } Any help would be very appreciated. This is done on .NET 4 and I'm using ReportViewer 2010. Many thanks, Maya.

    Read the article

  • Using Microsoft.Reporting.WebForms.ReportViewer in a custom SharePoint WebPart

    - by iHeartDucks
    I have a requirement where I have to display some data (from a custom db) and let the user export it to an excel file. I decided to use the ReportViewer control present in Microsoft.Reporting.WebForms.ReportViewer. I added the required assembly to the project references and I add the following code to test it out protected override void CreateChildControls() { base.CreateChildControls(); objRV = new Microsoft.Reporting.WebForms.ReportViewer(); objRV.ID = "objRV"; this.Controls.Add(objRV); } The first error asked me to add this line in the web.config which I did and the next error says The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not implement IReportViewerMessages Is it possible to use ReportViewer in my custom Web Part? I rather not bind a repeater and write my own export to excel code. I want to use something which is already built by Microsoft? Any ideas on what I can reuse? Edit I commented the following line <add key="ReportViewerMessages"... and now my code looks like this after I added a data source to it protected override void CreateChildControls() { base.CreateChildControls(); objRV = new Microsoft.Reporting.WebForms.ReportViewer(); objRV.ID = "objRV"; objRV.Visible = true; Microsoft.Reporting.WebForms.ReportDataSource datasource = new Microsoft.Reporting.WebForms.ReportDataSource("test", GroupM.Common.DB.GetAllClientCodes()); objRV.LocalReport.DataSources.Clear(); objRV.LocalReport.DataSources.Add(datasource); objRV.LocalReport.Refresh(); this.Controls.Add(objRV); } but now I do not see any data on the page. I did check my db call and it does return a data table with 15 rows. Any ideas why I don't see anything on the page?

    Read the article

  • vant view dataset with microsoft report viewer

    - by Tan
    I have a dataset, the dataset is using a stored procedur to fetch data. i have filled the dataset and everythings is okej.When iam using the debug i can se that the dataset is not empty. but i cant view it with the microsoft report viewer. here is my code please help. private void frmPrint_Load(object sender, EventArgs e) { this.reportViewer1.RefreshReport(); reportViewer1.LocalReport.DataSources.Clear(); GetCauseMachineMatrixTableAdapter adapter = new GetCauseMachineMatrixTableAdapter(); QpNibrolDataSet dataset = new QpNibrolDataSet(); adapter.Fill(dataset.GetCauseMachineMatrix, this.start, this.end); DataTable DT = dataset.Tables[0]; ReportDataSource reportdatasource = new ReportDataSource(); reportdatasource.Name = "RDS_NAME"; reportdatasource.Value = DT; reportViewer1.LocalReport.DataSources.Add(reportdatasource); reportViewer1.LocalReport.Refresh(); reportViewer1.RefreshReport(); } the form is saying "The source of the report definition is not been specified" what im i doing wrong. Idont use a rdlc because when iam trying to view my dataset no columms name show because the Stored procedur i am using requires Parameters. please advice and help my thank you

    Read the article

  • Getting a null reference exception exporting a slightly complex rdlc report to excel

    - by George Handlin
    Have an issue in exporting a slightly complex report to excel from an rdlc. Exporting a simple tabular report works fine, but getting a null reference exception with a more complex one. As is usually the case, it works on the server in the development environment, but not in the test environment. The server in the development environment has iis, sql and sql reporting services on it and test only has iis (I didn't set them up). I'm guessing there is something that gets installed with SSRS that is not installed with just the report viewer. The report has several parameters going into it and a few generic lists going in for datasources. Some tables for display as well as a list. Working with the 2005 version. Exception follows: [NullReferenceException: Object reference not set to an instance of an object.] Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack) +91 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout& lastPageLayout) +607 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets() +150 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet() +358 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream) +158 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream) +385 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +230 [ReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +296 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1124 [WrapperReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1681 Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) +1693 Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings) +227 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +235 [LocalProcessingException: An error occurred during local report processing.] Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +276 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +189 Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +28 Microsoft.Reporting.WebForms.LocalReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileNameExtension) +52 Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +202 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Read the article

  • SSRS Report problem in wpf

    - by Johnny
    DataTable reportData = this.GetReportData(startId, endId, empId, minAmount, reportType); ReportViewer reportViewer = new ReportViewer(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.LocalReport.ReportEmbeddedResource = "PDCL.ERP.Modules.Marketing.Reports.rptDoctorDetail.rdlc"; ReportDataSource ds = new ReportDataSource(); ds.Name = "DoctorDetail_Report"; ds.Value = reportData; reportViewer.LocalReport.DataSources.Add(ds); reportViewer.RefreshReport(); this.WindowsFrmHost.Child = reportViewer; this is my code.I'm using SSRS but the viewer only shows but not any data. Why..?

    Read the article

  • Using MicrosoftReportViewer with Web Forms programmatically

    - by user283897
    Hi, I'm repeating my question because the prior one under this topic was lost. Could you please help me? I want to use MicrosoftReportViewer for Web Forms so that the DataSource be set programmatically. There is some sample code on the Internet for Windows Forms but I haven't found anything for Web Forms. For example, here is some code I've tried to use. It gives no errors but nothing is displayed. How should I modify the code to display a table in the ReportViewer? Imports System.Data Imports Microsoft.Reporting.WebForms Partial Class TestReportViewer Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load CreateReport() End Sub Sub CreateReport() Dim dt As DataTable Dim rpt As ReportDataSource dt = New DataTable("Sample") With dt .Columns.Add("No", GetType(Integer)) .Columns.Add("Name") .Rows.Add(1, "A1") .Rows.Add(2, "A2") .Rows.Add(3, "A3") .Rows.Add(4, "A4") .AcceptChanges() End With rpt = New ReportDataSource rpt.DataMember = "Sample" rpt.Value = dt rpt.Name = "test" With ReportViewer1 .LocalReport.DataSources.Add(rpt) .DataBind() .LocalReport.Refresh() End With End Sub End Class

    Read the article

  • ReportViewer datadinding (WPF)

    - by user512150
    I have a rdlc file and I try to show it using report viewer control in WPF. My DataSource is called 'OfficeDataSet' and DataSet used in report is called 'Address'. I try to initialize report viewer (I put it in WindowsFormsHost) like this: private void PrepareReport() { reportDataSource = new ReportDataSource(); officeDataSet = new OfficeDataSet(); adapter = new AddressTableAdapter(); adapter.Fill(officeDataSet.Address); reportDataSource.Name = "OfficeDataSet_Address"; reportDataSource.Value = officeDataSet.Address; viewerInstance.LocalReport.DataSources.Add(reportDataSource); viewerInstance.LocalReport.ReportEmbeddedResource = "WpfApplication1.Reports.TestReport.rdlc"; viewerInstance.Location = new System.Drawing.Point(0, 0); viewerInstance.RefreshReport(); } but I got the message "A data source instance has not been supplied for the data source 'Address'". Anybody know what can be wrong with this code? (I'm totally new in WPF and Reporting Services).

    Read the article

  • SSRS ReportViewer 2010 Iframe IE Problem

    - by Phil
    Hello all, My problem relates to trying to include an SSRS (SQL Server) Report inside my MVC application. I've settled on the hybrid solution of having a WebForm with the ReportViewer Control in and then on my MVC View pages having an iframe reference this WebForm page. The tricky part is that the iframe needs to be dynamically populated with the report rather than using src due to posting parameters to the WebForm. It works perfectly in Firefox and Chrome, however IE throws a "Sys is Undefined" javascript error. Using src on the iframe works in IE, but I can't find a way to post parameters (don't want to use something like /Report.aspx?param1=test due to the possible length). Its a ASP.NET MVC 2 project, .NET 4, Visual Studio 2010 on Windows 7 x74 if its any help. So here is the code (I could provide the VS2010 project files if anyone wants them) In my webform: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="SSRSMVC.Views.Home.Report" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <form id="RSForm" runat="server"> <asp:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true" ScriptMode="Release"> </asp:ScriptManager> <asp:UpdatePanel ID="ReportViewerUP" runat="server"> <ContentTemplate> <rsweb:ReportViewer ID="ReportViewer" runat="server" Width="100%" Height="380px" ProcessingMode="Local" InteractivityPostBackMode="AlwaysAsynchronous" AsyncRendering="true"> <LocalReport ReportPath="Models\\TestReport.rdlc"> </LocalReport> </rsweb:ReportViewer> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html> And Codebehind: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Microsoft.Reporting.WebForms; namespace SSRSMVC.Views.Home { public partial class Report : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string test = Request.Params["val1"]; ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", new SSRSMVC.Models.DataProvider().GetData())); } } } } And lastly my View page, <script type="text/javascript"> $(window).load(function () { $.post('/Report.aspx', { val1: "Hello World" }, function (data) { var rv_frame = document.getElementById('Frame1'); rv_frame = (rv_frame.contentWindow) ? rv_frame.contentWindow : (rv_frame.contentDocument.document) ? rv_frame.contentDocument.document : rv_frame.contentDocument; rv_frame.document.open(); rv_frame.document.write(data); rv_frame.document.close(); }); }); </script>

    Read the article

  • ReportViewer add Parameters ...

    - by user95542
    Hi, I need help.Well, i need add image logo in reportviewer dynamically.I get this image from db, convert toBase64 and i need add in reportviewer.... this code next.. rpViewer.LocalReport.EnableExternalImages = true; Company _company = db.Companys.Where(c => c.codCompany == c.codCompany).Single(); //first step byte[] img = _company.imagem.ToArray(); // i get image from db MemoryStream _ms = new MemoryStream(img); string logo = Convert.ToBase64String(img); //convert to base64 // 2 step List<ReportParameter> lstReportParams = new List<ReportParameter>();//Create params lstReportParams.Add(new ReportParameter("Logo", logo)); lstReportParams.Add(new ReportParameter("LogoMimeType", "image/png")); this.rpViewer.LocalReport.SetParameters(lstReportParams); // Here don´t work´s {"An error occurred during local report processing."} {"An attempt was made to set a report parameter 'Logo' that is not defined in this report."} this.rpViewer.RefreshReport(); In Rldc.... MIMEType =Parameters!LogoMimeType.value Value ="System.Convert.FromBase64String(Parameters!Logo.Value)" Why not work? Why is not recognizing the parameter? need help urgente.I can load that image in reportviewer...Thank´s..

    Read the article

  • Creating an ASP.NET report using Visual Studio 2010 - Part 3

    - by rajbk
    We continue building our report in this three part series. Creating an ASP.NET report using Visual Studio 2010 - Part 1 Creating an ASP.NET report using Visual Studio 2010 - Part 2 Adding the ReportViewer control and filter drop downs. Open the source code for index.aspx and add a ScriptManager control. This control is required for the ReportViewer control. Add a DropDownList for the categories and suppliers. Add the ReportViewer control. The markup after these steps is shown below. <div> <asp:ScriptManager ID="smScriptManager" runat="server"> </asp:ScriptManager> <div id="searchFilter"> Filter by: Category : <asp:DropDownList ID="ddlCategories" runat="server" /> and Supplier : <asp:DropDownList ID="ddlSuppliers" runat="server" /> </div> <rsweb:ReportViewer ID="rvProducts" runat="server"> </rsweb:ReportViewer> </div> The design view for index.aspx is shown below. The dropdowns will display the categories and suppliers in the database. Changing the selection in the drop downs will cause the report to be filtered by the selections in the dropdowns. You will see how to do this in the next steps.   Attaching the RDLC to the ReportViewer control by clicking on the top right of the control, going to Report Viewer tasks and selecting Products.rdlc.   Resize the ReportViewer control by dragging at the bottom right corner. I set mine to 800px x 500px. You can also set this value in source view. Defining the data sources. We will now define the Data Source used to populate the report. Go back to the “ReportViewer Tasks” and select “Choose Data Sources” Select a “New data source..” Select “Object” and name your Data Source ID “odsProducts”   In the next screen, choose “ProductRepository” as your business object. Choose “GetProductsProjected” in the next screen.   The method requires a SupplierID and CategoryID. We will set these so that our data source gets the values from the drop down lists we defined earlier. Set the parameter source to be of type “Control” and set the ControlIDs to be ddlSuppliers and ddlCategories respectively. Your screen will look like this: We are now going to define the data source for our drop downs. Select the ddlCategory drop down and pick “Choose Data Source”. Pick “Object” and give it an id “odsCategories”   In the next screen, choose “ProductRepository” Select the GetCategories() method in the next screen.   Select “CategoryName” and “CategoryID” in the next screen. We are done defining the data source for the Category drop down. Perform the same steps for the Suppliers drop down.   Select each dropdown and set the AppendDataBoundItems to true and AutoPostback to true.     The AppendDataBoundItems is needed because we are going to insert an “All“ list item with a value of empty. Go to each drop down and add this list item markup as shown below> Finally, double click on each drop down in the designer and add the following code in the code behind. This along with the “Autopostback= true” attribute refreshes the report anytime a drop down is changed. protected void ddlCategories_SelectedIndexChanged(object sender, EventArgs e) { rvProducts.LocalReport.Refresh(); }   protected void ddlSuppliers_SelectedIndexChanged(object sender, EventArgs e) { rvProducts.LocalReport.Refresh(); } Compile your report and run the page. You should see the report rendered. Note that the tool bar in the ReportViewer control gives you a couple of options including the ability to export the data to Excel, PDF or word.   Conclusion Through this three part series, we did the following: Created a data layer for use by our RDLC. Created an RDLC using the report wizard and define a dataset for the report. Used the report design surface to design our report including adding a chart. Used the ReportViewer control to attach the RDLC. Connected our ReportWiewer to a data source and take parameter values from the drop downlists. Used AutoPostBack to refresh the reports when the dropdown selection was changed. RDLCs allow you to create interactive reports including drill downs and grouping. For even more advanced reports you can use Microsoft® SQL Server™ Reporting Services with RDLs. With RDLs, the report is rendered on the report server instead of the web server. Another nice thing about RDLs is that you can define a parameter list for the report and it gets rendered automatically for you. RDLCs and RDLs both have their advantages and its best to compare them and choose the right one for your requirements. Download VS2010 RTM Sample project NorthwindReports.zip   Alfred Borden: Are you watching closely?

    Read the article

  • How to created filtered reports in WPF?

    - by Michael Goyote
    Creating reports in WPF. I have two related tables. Table A-Customer: CustomerID(PK) Names Phone Number Customer Num Table B-Items: Products Price CustomerID I want to be able to generate a report like this: CustomerA Items Price Item A 10 Item B 10 Item C 10 --------------- Total 30 So this is what I have done: <Window x:Class="ReportViewerWPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:rv="clr-namespace:Microsoft.Reporting.WinForms; assembly=Microsoft.ReportViewer.WinForms" Title="Customer Report" Height="300" Width="400"> <Grid> <WindowsFormsHost Name="windowsFormsHost1"> <rv:ReportViewer x:Name="reportViewer1"/> </WindowsFormsHost> </Grid> Then I created a dataset and loaded the two tables, followed by a report wizard (dragged all the available fields and dropped them to the Values pane). The code behind the WPF window is this: public partial class CustomerReport : Window { public CustomerReport() { InitializeComponent(); _reportViewer.Load += ReportViewer_Load; } private bool _isReportViewerLoaded; private void ReportViewer_Load(object sender, EventArgs e) { if (!_isReportViewerLoaded) { Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); HM2DataSet dataset = new HM2DataSet(); dataset.BeginInit(); reportDataSource1.Name = "DataSet";//This is the dataset name reportDataSource1.Value = dataset.CustomerTable; this.reportViewer1.LocalReport.DataSources.Add(reportDataSource1); this.reportViewer1.LocalReport.ReportPath = "../../Report3.rdlc"; dataset.EndInit(); HM2DataSetTableAdapters.CustomerTableAdapter funcTableAdapter = new HM2DataSetTableAdapters.CustomerTableAdapter(); funcTableAdapter.ClearBeforeFill = true; funcTableAdapter.Fill(dataset.CustomerTable); _reportViewer.RefreshReport(); _isReportViewerLoaded = true; } } As you might have guessed this loaded this list of customer with items and price: Customer Items Price Customer A Items A 10 Customer A Items B 10 Customer B Items D 10 Customer B Items C 10 How can I fine-tune this report to look like the one above, where the user can filter the customer he wants displayed on the report? Thanks in advance for the help. I would have preferred to use LINQ whenever filtering data

    Read the article

  • Adding a hyperlink in a client report definition file (RDLC)

    - by rajbk
    This post shows you how to add a hyperlink to your RDLC report. In a previous post, I showed you how to create an RDLC report. We have been given the requirement to the report we created earlier, the Northwind Product report, to add a column that will contain hyperlinks which are unique per row.  The URLs will be RESTful with the ProductID at the end. Clicking on the URL will take them to a website like so: http://localhost/products/3  where 3 is the primary key of the product row clicked on. To start off, open the RDLC and add a new column to the product table.   Add text to the header (Details) and row (Product Website). Right click on the row (not header) and select “TextBox properties” Select Action – Go to URL. You could hard code a URL here but what we need is a URL that changes based on the ProductID.   Click on the expression button (fx) The expression builder gives you access to several functions and constants including the fields in your dataset. See this reference for more details: Common Expressions for ReportViewer Reports. Add the following expression: = "http://localhost/products/" & Fields!ProductID.Value Click OK to exit the Expression Builder. The report will not render because hyperlinks are disabled by default in the ReportViewer control. To enable it, add the following in your page load event (where rvProducts is the ID of your ReportViewerControl): protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rvProducts.LocalReport.EnableHyperlinks = true; } } We want our links to open in a new window so set the HyperLinkTarget property of the ReportViewer control to “_blank”   We are done adding hyperlinks to our report. Clicking on the links for each product pops open a new windows. The URL has the ProductID added at the end. Enjoy!

    Read the article

  • SubReport in ReportViewer (VS2010)

    - by gigiot
    I have a problem when try to add a SubReport to a report. I'm using Visual Studio 2010. I've two report and two DataSet, one of every report. I've created master-report (report1 with DataSet) and i've added a subreport (report2 with DataSet1). I've created this event in Form_Load: this.reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(MySubreportProcessingEventHandler); and this function: void MySubreportProcessingEventHandler(object sender,SubreportProcessingEventArgs e) { e.DataSources.Add(new ReportDataSource("parameter1", "parameter2")); } but i don't know what i've to write in parameter1 and parameter2. my DataSet are: DataSet with table A DataSet1 with table B Someone can help me?

    Read the article

  • ASP.Net Reportviewer in folder not working

    - by Bruce
    We can run the ReportViewer in a ASP.Net Web App project that is off the root OK so localhost/test/report.aspx works. It's running as a Client Report. But if we move the application up another level the report stops working so localhost/testfolder/test/test.aspx. When the report fails it has no data to display and none of the images are loading. Info: We are bind the report in code and sort out the Report.LocalReport.ReportPath to the correct path. Can't help thinking there is a setting wrong, but stumped at the moment!

    Read the article

  • Displaying image in RDLC

    - by stackBest2
    I am working on a c# windows application. My problem is, I have stored jpg images in a folder. I need to retrieve the image from that folder and should display in the report(rdlc). I have written the following code but the image is not displaying. List<ReportParameter> param = new List<ReportParameter>(); param.Add(new ReportParameter("path", @"C:\picture\1.jpg")); reportViewer1.LocalReport.SetParameters(param);

    Read the article

  • Visual Studio 2010 is asking to convert RDLC created on VS2008 to RDLC 2008 format?

    - by Junior Mayhé
    I've created my project on Visual Studio 2008, as well RDLC files on it. But now, when I open the solution on Visual Studio 2010 and want to open RDLC file, it's showing me a warning. That's a little funny. The report was created on VS2008 and VS2010 is asking to convert to 2008 format. Perhaps there was a problem on my VS2008 installation that created RDLC files using some ancient format (2005??!) The problem is, when you confirm with Ok button, do some design ajustments and run the app, it throws an error on 'Main report': ex.InnerException {"The definition of the report 'Main Report' is invalid."} [Microsoft.Reporting.DefinitionInvalidException]: {"The definition of the report 'Main Report' is invalid."} Data: {System.Collections.ListDictionaryInternal} HelpLink: null InnerException: {"The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded."} Message: "The definition of the report 'Main Report' is invalid." Source: "Microsoft.ReportViewer.Common" StackTrace: " at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)\r\n at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport()\r\n at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot()\r\n at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot)\r\n at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContext itemContext, Boolean rebuild, ReportSnapshotBase& snapshot)\r\n at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild)\r\n at Microsoft.Reporting.WinForms.LocalReport.CompileReport()" TargetSite: {Microsoft.ReportingServices.ReportProcessing.PublishingResult CompileReport(Microsoft.ReportingServices.Diagnostics.CatalogItemContext, Byte[], Boolean, Microsoft.ReportingServices.Library.ReportSnapshotBase ByRef)}

    Read the article

  • ObjectDataSource.Select with Parameters Time Out

    - by MasterMax1313
    I'm using an ObjectDataSource with a 2008 ReportViewer control and Linq to CSV. The ODS has two parameters (the SQL is spelled out in an XSD file with a table adapter). The Reportviewer takes a very long time to render the output after a button is clicked to generate the report. That's my first problem. Even though it works (most of the time), the processing time worries me, and subsequent requests don't seem to be changing the results shown on the screen. The next issue is that when I go to export the ODS to CSV I'm getting a time out exception on the select method of the ODS (shown below). This works for ODS without parameters, but it seems like now that I've added parameters that it doesn't want to cooperate. I'm fresh out of ideas, any thoughts? <asp:ObjectDataSource ID="obsGetDataAllCustomers" runat="server" SelectMethod="GetDataAllCustomers" TypeName="my.myAdapter.AllCustomers" OldValuesParameterFormatString="original_{0}" > <SelectParameters> <asp:ControlParameter ControlID="StartDate" Name="Start" PropertyName="Text" Type="DateTime" /> <asp:ControlParameter ControlID="EndDate" Name="_End" PropertyName="Text" Type="DateTime" /> </SelectParameters> </asp:ObjectDataSource> After button click to view report - rvAllCustomers.LocalReport.Refresh() Export to CSV (adding the items returned to a list which is then processed by working code) - For Each dr As DataRow In CType(obs.Select(), DataView).Table.Rows l.Add(New FullOrderOutput(dr)) Next

    Read the article

1 2  | Next Page >