Is it possible to generate a CrystalReport without using the wizards of the DataSets and CrystalReports?
If so, which is the best way to tackle it?
So far, I've created an empty DataSet and an empty CrystalReport, and linked the CrystalReport to the latter DataSet using the wizard. Afterwords, I am creating a DataTable, putting this table into the DataSet and displaying it into a report. But an exception always generates telling me that no table was found. This is definetly not the case, since the same table is being viewed as a GridView at a previous stage.
Any help is highly appreciated,
Thanks
I think the CrystalReport will generate some kind of schema - so when you first show it a empty set it won't find the table afterwards. There should be some kind of "refresh database" inside the wizard.
Normaly you wan't to create a typed-dataset (with the VS-Designer) and show this to the wizard. Then everything works rather fine.
OT:
But as a long time user of CR let me tell you: this tool is a pain in the A. - if there are more than one version of it on a system (and chances are pretty high for this) you will witness all kind of really bad behaviour.
Related
Im using a Dataset class .xsd file which contains schema for 2 tables. This is a part of a dll which I am adding as a reference to my project. Iam able to use all the methods from the referenced dll.
While designing the crystal report, for the Datasource, by default this dataset is prompted and I am able to see both the tables under it and from the field explorer i have used the columns from the tables.
I am filling in data into those two tables during runtime before calling the report. It works perfectly fine.
BUT, when I move my code from one server environment to another, the database login information is prompted everytime I load the report.
Im not using any table from the database. I don't understand how to make crystal report 'see' the datasource.
I have gone through most help links that talk about this problem, but not one seem to have my kind of environment. Please advise. Thanks in advance
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'm new to reporting in VS 2010 and I'm trying to use integrated report viewer. My current understanding is that If my system has 10 reports I should create 10 DataSets so one DataSet per report. The problem is I want to organize these DataSets in the IDE. I have folders for each type of reports in the solution explorer and I want to move respective DataSets to such forlders.
But when it is moved to a folder list of errors are shown in the code and after realizing that the namespace names of the moved DataSets have been changed, I manually changed them to original namespaces but still I have problems like System.DataSet1DataAdapter not found, No fill method have been defined etc etc.
How to solve this problem? Otherwise is it better to keep DataSets in the root folder?
Could we create DataSets for reports in code? What is the practice in professional level?
Is integrated reporting considered a consistent way to do reporting?
NOT: I'm developing a Win forms application
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 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.