AoA, Hello
i am writing an application for financial solution. in short i ve to get out print of report that is generated. Crystal report is what i want to use....
my problem is that i just want to preview report and allow to insert any change that user want to make. Or easily we can say want to allow edit entries.
is there any method to preview?.... Note that i am newbie ..... so apology if i am unable to deliver correct question. Hope you understand and will help me.
take care.
You don't say what type of project you are working on (ASP? Winforms?)... but I suspect the answer may be similar in all cases.
While a preview control is available in Crystal Reports (at least version XI, for WinForms based solutions), I am 95% certain that the preview is non-editable. I believe that if you wanted to change fields within the report you would need to "re-run" the report processing before you could get an updated preview.
Related
I have a program which analyses some information in runtime and save the analysis results in certain variables. I have 15 of these variables, of which, 13 are string type, 1 integer and 1 bitmap image. I want to let the user to generate a report based on the analysis data. I have been trying to search the forums for help, but couldn't find a proper solution yet.
First of all, I don't want to save these analysed results in a database (SQL etc). All i want to do is just to display the report to the user based on analysis results and let him save or print it.
This is what I did so far based on numerous hints that I get from forums. I added a report.rdlc file and created a template for the report. I also created a dataset.xsd file and added the analysis parameters to the dataset. All the dataset values are added to the report template.
Now this is where I am stuck. I don't have an idea how to proceed from here and generate a report. Right now what my program does is, upon button click, the analysed parameters will be saved in their respective variables that I specified in the main program. What I want to achieve is to use these results and generate a report as in the template. Sorry that I am not able to post images here due to the user restriction.
Any guidance on how to achieve this is much appreciated.
Thank you!
From what I recall, reports support parameters which can be injected via the presentation control.
With little else to go on, I would look here first.
i want to build a payroll report that user can select or deselect columns as user wanted. for example for each employee user can select check boxes that represent each column in a list like - Nic, Net salary , Nopay day , etc in any combination.i think all columns are returned in the SP and only shows selected columns.Can you please give me some idea how to do it..
Tilan. I'm not aware of a crystal reports presentation app that you can get that will make your job any easier, but I'd not be surprised if you are spoilt for choice. SAP offer report serving software and their material on Dashboard Design and Crystal Server may be worth looking at (SAP Crystal Reports). However, this may be overkill for your purposes.
An alternative approach is to try to define "loose" columns (I don't know the professional term!). I distinctly recall pulling this off some years ago, but don't recall the specifics and no longer have access to the report (previous employer). This article covers the steps. It's ugly and has a range of disadvantages (huge gaps where columns have been suppressed being a big one), but it might solve your problem.
This guy creates generic columns in his report then builds his query on the fly. His form only caters for the one report, but I think you could adapt his solution to suit your needs.
Cross-tabs may be exploited to suit your purposes (I think). I have little experience with these, but it seems a little tweaking might allow dynamic columns.
The better alternative (by far) is to handle this in your presentation. You've tagged WinForms and C#, so I can assume you've created a win app with a report viewer on it. Assuming you define your dataset in the report, your code should be able to handle the creation of columns at runtime (or suppress/enable and reposition) by looking at the report's DataDefinition. I've read that creating columns at runtime is somewhat dependent on your CR/VS version which I can only guess at.
Hope this helps.
If you can narrow the combination of selected columns to a manageable minimum you can create a subreport for each combination and suppress all subreports except the right one.
I am working on the desktop application which needs to print the bill.I am currently using Visual Studio 10 and sql express as database.
I need to print the bill in the pre printed paper which has majority of the content.
I just need to add the customer name, some customer details and content of the bill which is saved in the database.
The pre printed bill has logo along with some basic information of the company....
so i need to fill the bill with name and search the data using stored procedure.
i will be grateful if anyone helped me in any way possible
Try scanning the hard copy paper into an image file, and setting that image file as the background on the report.
From there, just put a couple of the fields onto the report where it looks like they should go. Remove/hide the background and print a test page to find the offset. It should be pretty evident if the fields are generally a centimeter higher on the page than they should be. Then just adjust the fields accordingly.
I know it seems like a daunting task at first, but after the first one or two reports you will get the hang of it.
[Edit]
In the report itself, hide the header and footer and set the detail height to 7.5 (or whatever the full page height is, taking into account margins). Pass the report exactly one record with the values that need to be printed.
You may also consider using SQL Server Reporting Services (SSRS) instead of Crystal Reports. Crystal can be tricky to deploy with desktop applications. SSRS Express is free. You will just need to install SQL Server Express with Advanced Services.
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.
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.