How to Create HTML Template with parameters in .Net - c#

I am trying to create a Report that has Header Information (e.g. Project Information) and its transactions in Detailed Information.
e.g.
Project ID: 1010 Name: Health Evaluation Client: US Govt
Location: DC Date: 31-Dec-2014 Contact : 000-000-0000
Detailed Transactions......
Acct No|Acct Name|Current Charges|Year-to-Date Charges|Project-to-Date Charges
100|Employee|251|1251|15427
110|Office|10|100|1221
120|Postal|5|20|200
...More
All the values come from database.
while doing some search on how to do, i found one of the best way is to create parameters html template or templates ? for both header and the detailed page and loop through it, but i am not sure how and where to start this. Could some one please give me some information / links or If you think there is a better way, please let me know

For reports could use crystal reports. it has many advantages, could export into excel, pdf, word. and it's very easy to create reports.
works for asp.net also but I got some issues while using export and other commands, but I make it works from code and ussing buttons instead of the crystal report control.
Use Crystal Report for Visual Studio 2010

Related

Need help creating a aspx page demonstrating opening a SSRS report through a url

first: I am not a web-developer, my experience with asp.net is marginal. That is why I seek help.
I need instructions how to create a simple asp page that will
list a hierarchical view of all reports on a specific location.
These reports must then be transformed into hyperlinks that will open
that report without asking for credentials
On opening the report the page must know which parameters are
necessary in the report, what type they are and whether they should
be shown.
This should be done without using the reportviewer web control
I figured that I could use Listchildren() to get a list of reports.
I know that, when you know name and location of a report, you can open it through a url.
I know that is is possible to iterate through the parameters of a report and show/hide them in your page
But how to do that in a asp.net page?
I can not find any real simple noob level instructions for what should not be so hard....
Can somebody provide me with some examples/hints/easy-to-follow-step-by-step-reporting-and-programming-for-dummies-instructions on a noob-level?
I am using VS2012, SQL 2012 Standard, Windows Server 2012, IIS8

How do i make use of .rdlc reports created using the VS 2008 Report Wizard?

I have a c# project where i created a dataset, then when through the steps of creating 3 reports via the Report Wizard. The rdlc files are now in my project and i have a reportviewer control in my Winforms project. The question is, after going through the process of setting up the dataset and reports, how do i get any of them to display in the reportviewer? When i try to set the ReportEmbeddedResource to be one of the rdlc files, i get a message in the viewer saying the source of the data has not been set. I did that when i created the data set and the report.
Any ideas?
Here is a detailed tutorial on how to use Local Reports : http://msdn.microsoft.com/en-us/library/ms252075%28v=vs.90%29
I had to do this last year, Local Reports are kind of a headache. The problem is .rdlc files do not fill their data sets (they ignore all the <Query tags. So, what I had to do is write a custom .ascx that would parse the <Query> tags in the .rdlc, fill the DataSets, and pass the new file to the ReportViewer control.
Basic steps:
1. Build a set of input fields based on the QueryParameters inside any <Query> tags. This usually involved cascading comboboxes since parameters can be dependent.
2. When the user submits the form, fill the DataSet associated with each <Query>.
If you look at the way you input parameters in VS 2008 when you test an RDL, the control you will make does exactly that.
All of this had to be done because of a client request to not have to authenticate when running the report...ugh. The fun thing is, I never found a complete schema for RLD/RDLC XML so I had to look at a lot of report files to figure out all the variations.
EDIT: I missed the part where you said WINFORMS. My scenario was for Webforms, though it might still apply I've never used the ReportViewer control in Winforms.

Reporting Services 2005 Report with Disclaimers page after each section

Details:
I am using Reporting Services 2005 in a C# Application with Visual Studio 2008 to generate reports based on a SQL Server 2005 database. The application views the report locally using the .net report viewer and no report server is used. There is a page break in the report after each person. I am currently using just one report table for the .rdlc file to generate the report.
Question:
My client wants to put a disclaimers page after the grouping has ended for each person listed on the report. The client wants to be able to adjust the disclaimer page on the fly through the user interface, before running the report. Please offer suggestions on how I can accomplish this.
Any help is appreciated.
Thanks,
Jeremy
An alternative solution would be to create another report for the sole purpose of rendering the Disclaimer content. The Disclaimer report can then be embedded (via a subreport: see http://msdn.microsoft.com/en-us/library/ms160348.aspx) into your existing reports thereby allowing you to dynamically modify the content of the Disclaimer separately.
You could store the actual Disclaimer content within a SQL Server Database table and update it via any number of the typical simple standard .NET controls that are at your disposal.
This has the advantage of no character restrictions as per the prior recommendation.
Do you mean they want to adjust it on the fly PRIOR to executing the report or after?
If before, could you not use a parameter, with the disclaimer template as the default value and submit it to the report when they are done? You could then put the parameter in the group footer.
If after then...good luck :) The report is rendered into whatever format chosen. If you are retrieving the report in html and have the rendered file perhaps custom parsing could be done but seems a bit naff. Been a while with SRS, hopefully the param could work for you.

Inheritance in Reporting Services

Is there any way you can implement inheritance in Reporting Services? I would like to have a master report, that contains the standard header and footer + some info in the beginning of the report, as well as containing some report parameters. Then I would like to create a new report that inherits the master reports design and then I could add spesific content to that report. Then if I needed to change a header logo or something, I could just alter the master report and that change would propagate to all inherited reports. I'm looking for similar functionality as the asp.net masterpage gives on websites.
Is this at all possible using Reporting Services 2005, Visual Studio 2008 and c# ? Or is there any workarounds that could help me achieve this?
I render all reports to pdf by the way.
I had the same problem - but could not solve it in the given time so I put all the header, footer and sidebar information I needed on every report in subreports and integrated the subreports on all needed reports.
it's a very quick and dirty - copy-paste solution but it works now.
you should be able to achieve this using sub reports

How to restrict download options on a single report in SSRS?

This question asks how to restrict for a whole server. I just want to do so for a single report. I found a code snippet but it doesn't provide any clues on how to implement:
foreach (RenderingExtension extension in this.reportViewer.LocalReport.ListRenderingExtensions()) {
if (extension.Name == "PDF") {
((Extension)(extension.GetType().GetField("m_serverExtension", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(extension))).Visible = false;
}
I can't see how to make the report reference this code upon loading. Does anyone know how I am supposed to make the report execute this code?
EDIT: Incidentally report access is through the SSRS Report Manager web app. We are, in the main, delighted with this product so wouldn't consider reinventing the wheel in order to implement a hack to produce what is, essentially a "would be nice" feature.
It still boggles the mind slightly that the report's available rendering options are not controllable at the report level. Ho hum.
Incidentally I found this blog entry which clarifies the above code a little. Turns out we're talking about using a reportviewer component to limit the export options. Apparently this requires a dirty, dirty hack and besides it's not how we want to run our reporting function.
So unless anyone has a better idea than this within the next fortnight I'll mark this as the answer which basically sums up to:
You can only restrict functionality like this under certain conditions and by no means easily even when you do.
This seems like a clear failure in the wider fitness of SSRS for purpose as we have users who require Excel export functionality and users who need to be limited to PDF only. Oh well.
Does it matter?
Once they've downloaded the data and taken it offsite, you've lost it anyway.
You haven't really described how you are calling the reports - have you created some kind of application? Are you actually using the report viewer control?
You can generate a report in a specific format using the report URL and including the rs:Format parameter, e.g.
http://SERVER/reportserver?%2fSomeFolder%2fSomeReport&rs:Command=Render&rs:Format=PDF
The above URL generates the report as a PDF. You can also use the URL to hide the report toolbar etc. so you could create these URLs as links in your application, maybe one using just rs:Command=Render as a "View Report" link and one link that includes rs:Format=PDF as an "Export to PDF" link.
More on Reporting Services URL access.

Categories