I am currently working in a RDLC report-generating application, and one of the reports is bound to a DataTable in my DataSet, which has multiple FillBy methods, which are needed depending on some criteria the user has already chosen. My problem is, one of the FillBy methods is generating additional columns that I need in my report, but they don't appear through the available columns to populate controls in the report. I can only choose between the columns available from the default FillBy method of the DataTable.
Is there any way of choosing which FillBy method is used in the DataSet when I want to set the source of my report's controls? I would like not to change the default FillBy method since it is already needed in other parts of my application.
P.S. If there is any code needed, table structure etc just tell me and I will reply as soon as possible. Also, either VB.NET or C# is accepted, since I can easily translate between these two.
Related
I have a list of stored procedures which return different types of object (with varying column) to my business layer. Also, I created a single RDLC file named allreports.rdlc in my mvc application and put it in some .cshtml page.
Now, I want to call any of the stored procedure (based on user input passed as query parameter to my controller) and retrieve data in dataset (or any better format if available) and want to pass it to my rdlc report.
Can I achieve this using a single rdlc file which will be used to populate my any of the stored procedure dataset results. Also, please suggest if there is any other approach to achieve this?
Goal: To integrate all the reports in a single report page by changing underlying data formats. I don't want to make my application releases for each new report requirement by changing the underlying codes.
If any more clarification is needed; let me know instantly so that I could search the solution for it.
Syncfusion.EJ.ReportViewer library can dynamically create RDL reports in code behind by using ReportDefinition object. Please refer to sample that populates Tablix report item based on Datatable columns.
Sample Link
The whole product is available for free through the community license if you qualify (less than 1 million USD in revenue).
I work for Syncfusion.
I am developing spotfire data source and using this, my datasource is going to get data from multiple URL's. For each URL I have to create a table in spotfire. Could you please show me some code to achieve this.
First, note that a single data source object can only produce a single table. That is, you cannot "hardcode" a list of URLs in your DataSource class. However, you can supply a single URL as parameter and require your user of the Spotfire Professional Client to enter the URL when he creates the data table (e.g., by clicking File -> Add Data Table) and have him/her do that multiple times.
The important step in implementing this is to make Spotfire aware of the information supplied as a parameter and make this information serializable (Spotfire Prof. has to store it somewhere in the DXP after all). You do this by writing a "PromptModel" class, registering together with the associated View (the form that will be displayed to the user to prompt for the URL), and then doing some wiring (registering, implementing the right constructor, etc.).
The example that you linked glances over this stuff unfortunately (you see some comments saying "Not shown..."). However if the Spotfire SDK (TIB_spotfdev*.zip), you'll find a more extensive example called "SpotfireDeveloper.CustomDataSourceExample" that takes care of all these steps.
We are using Crystal Reports XI R3 for our reporting purposes. We have created typed dataset which act as the datasource for the reports.
I am facing an issue including a bar chart along with the grid on one of the reports. The chart gets embedded into the header section by default and the grid is generated out of the details section.
If I design the report without the chart, it all works fine. If I supply 8 rows of data, it publishes 8 rows in the report too. But if I include a chart on the same report, the data in the details section gets multiplied, and I get 64 rows or something with the same datasource.
This should be a pretty straight forward functionality, but it doesn't seem to be working for me. I tried include a sub-report and have the details section in the sub-report and it works fine. But, I can't go with this approach either as this report in itself would be included to another as a sub-report and we cant have nested sub-reports in Crystal.
Please help me with some pointers on what could be going wrong ?
Edit: On further investigation, it looks like a problem with having two different tables to populate the chart and the grid. If I use a single table for both, it works fine.
Attaching screenshot on #Kalyan's request:
The issue indeed was with using multiple unrelated tables for a single report. Crystal Reports by default doesn't allow using multiple tables, unless they are linked in someway. If you dont specify a link, it tries to apply a link on its own and runs a join while publishing the report.
Due to this join, the data was getting repeated for me.
To resolve the issue, I created a group on the primary key of the table corresponding to the grid, and used the group to generate the grid and suppressed the details section. Problem resolved.
I need to localize labels / column header for a ReportViewer report. From what I've read, there are two ways you can do this:
1) Create a RDLC file for each language or
2) Create one RDLC file and parse this at runtime, replacing the label/header values with the strings for the current culture.
I'm thinking #2 is gonna be less work in the long run, but I would like to confirm that the newest version doesn't support localization out of the box. Am I correct that I'll have to roll my own? Actually, I'll probably use the solution here.
I am not aware of localisation available in the 2010 (2008?) version but another quick option is included below:
An option I have used is to create a language dataset then pass in values from language files. So when you want to use a text string you end up with just references to dataset values, normally we used a long dataset with only 1 row and then used the first() function.
We stored XML files for languages and then just populated a dataset on the local report. Not too sure if that would work on remote mode reports though.
I need to add a second DataTable from our app's main DataSet into a report, but not having much luck.
We have several simple local reports in RDLC files, each with a single DataTable based on a view in our application DB. I need to improve one of the reports to add information from another table. This other table is defined in the same core DataSet which we use for reports in our .NET 2.0 WinForms application. Since the two tables are in the same DataSet, can I just make sure that both tables are loaded into the DataSet and then point the report at the DataSet instead of the DataTable? Something else?
Needless to say, I've been playing around with this for a while and not getting anywhere.
TIA,
Matt
OK, I got this working and, in retrospect, it was pretty easy. I just didn't know which menus to use for getting VS to hook everything up, and which order to do them in.
Looking at the Designer.cs for my form was actually the most helpful thing I did. I noticed was that the ReportViewer has a default BindingSource pointed at the first table. Originally, I was hung up on trying to give the BindingSource a DataSet instead of a DataTable, but then I decided to try making a second BindingSource instead.
Maybe there's a better way, but here's basically what I ended up doing:
With the RDLC in the designer, clicked the Report menu then Data Sources.
On the Report Data Sources dialog, chose the additional DataTable from the drop-down and clicked Add to Report. (I also renamed the new data source to just be the name of the additional data table; VS had created some gigantic long name based on the full namesspace.) OK to close the dialog.
On the designer for the form that contains my ReportViewer control, clicked the ReportViewer's smart tag (the little arrow in the top right corner of the control) and then selected Rebind Data Sources. This made a second BindingSource appear at the bottom of the Designer surface.
Clicked the ReportViewer's smart tag again and this time chose "Choose Data Sources" to confirm that the ReportViewer now had two data sources, each bound to one of BindingSource instances now on the form.
Revised the my form's OnLoad code to load rows into the second DataTable.
Went back to the RDLC file, added a new table and set the detail cells to fields in the second DataTable -- and it worked!
Hopefully this will save someone else a couple hours someday.
Figured out a way to use it in Visual Studio 2010.
Click on View > ReportData and when the report data is seen , click on Datasources and then click on add. DO this as many times as the number of datasets needed.
Now in the smart tags of the reportviewer, click on choose datasources, this will show each of the datasets. To associate the datasets with a binding source, you will have to click on Project and then further click till you get the appropriate class, this will cause the binding sources to be created.
This work around is very useful if you have multiple tablixes and you have to associate a binding source to them within the same report when the report is displayed on the report viewer