Hi all,
i have been working trying to create an customised RDL file in C#. So i hve been successful in creating that, but the problem lies in viewing it. how can i present it to the viewer?
Thanks in advance
Hi all,
i have been working trying to create an customised RDL file in C#. So i hve been successful in creating that, but the problem lies in viewing it. how can i present it to the viewer?
Thanks in advance
Given that is generating an .rdl at runtime and wants to present it without dragging the ReportViewer toolbox, two practical routes solve the problem: render on an SSRS server (no viewer control required), or render locally by loading a report definition into the local processing engine and supplying data programmatically. ’s pointer toward server vs. local processing is the right split; the choice depends on whether an SSRS instance is available and whether the dynamically generated XML matches the client-side schema.
Server-side (no ReportViewer UI): deploy or reference the .rdl on the report server and request a rendered format (PDF/HTML/XLS). A simple HTTP request can return a rendered file which the utility can save or stream to a browser/PDF viewer. Example (conceptual):
var url = "http://myserver/reportserver?/Folder/MyReport&rs:Format=PDF&Param1=val";
var wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
wc.DownloadFile(url, tempPath);
Process.Start(tempPath); Local processing (embed rendering into the app): produce a client-compatible definition (RDLC or a subset of RDL that the local engine supports), load it from a stream, attach ReportDataSource objects whose names exactly match the report’s dataset names, then render to the chosen format and display or save. Conceptual example:
using(var ms = new MemoryStream(Encoding.UTF8.GetBytes(reportXml))) {
var rpt = new LocalReport();
rpt.LoadReportDefinition(ms);
rpt.DataSources.Add(new ReportDataSource("DataSet1", myDataTable));
var bytes = rpt.Render("PDF"); // use appropriate overloads
File.WriteAllBytes(tempFile, bytes);
Process.Start(tempFile);
} Quick troubleshooting notes: confirm dataset names match exactly; the local engine does not support every server-only RDL feature (shared data sources, certain expressions, or extensions); test a generated RDL by loading it into VS/Report Manager to validate structure; when using server rendering, ensure proper report path, credentials and URL encoding of parameters. Rendering to PDF/HTML and opening that file is the simplest way to show a dynamically created report without relying on the visual ReportViewer control.
Jump to Post— Ramy Mahrous 401Reporting viewer in Reporting tab in VS toolbox, but you need to modify its extension to rdlc if you need to process it in local mode. Just begin to drag Reporting Viewer on your form and you'll learn by practice.
Jump to Post— Ramy Mahrous 401So you should process it remotely, and give reportviewer's properties like ReportServerUrl, ReportPath, etc at runtime.
First of all you need to install SQL Server SP1 and RS hotfixes.
Jump to Post— Ramy Mahrous 401
ReportViewer.LocalReport = generatedOneRead in ReportViewer control you'll know how to show a report!
Reporting viewer in Reporting tab in VS toolbox, but you need to modify its extension to rdlc if you need to process it in local mode. Just begin to drag Reporting Viewer on your form and you'll learn by practice.
i have generated the rdl file dynamically. After generating it my requirement is to show the report to the viewer.
So you should process it remotely, and give reportviewer's properties like ReportServerUrl, ReportPath, etc at runtime.
First of all you need to install SQL Server SP1 and RS hotfixes.
i have taken help from
http://msdn.microsoft.com/en-us/library/aa237432.aspx
this site to develop the rdl file. The function as given here GenerateRdl() creates the .rdl file. Any pointers after that.
i have installed Sql Server.
ReportViewer.LocalReport = generatedOne Read in ReportViewer control you'll know how to show a report!
any links would be of great help. im trying to do without using report viewer tool box any other. it is meant to serve as utility
Don't generate rdl, design it using SQL Server Reporting Service, return to my previous answers, and know how to send parameters to it, using SetParameters(...)
i know using Sql reporting service would have made tasks more easier. but requriment says to generate the report.sumthing like this
mmm, I don't know actually but you can comment on this article or ask the author, he may help you.
any help will be great?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.