I've inherited a project that uses Active Reports. I'm required to basically create a simple pdf that holds data that's in a DataGrid on one of my ASP.NET pages.
I've only found a single walkthrough on the DataDynamics website and it only applies to users of VS2003 and VS2005.
The report I need doesn't need to be interactive. I don't need to use Document and Page events. I just need to take what I have in a DataTable (which is bound to my grid) and create a pdf file, which will be available for download.
Is there a straightforward way to create this simple, static report with ActiveReports? Thanks.
kmarks,
You can indeed do this very easily, you can use the same DataTable as a datasource for report by setting the datasource property of the report to the DataTable.Then you just need to add an ActiveReports TextBox control to the Details section of the report and then set its DataField property to a column name in the datatable to bind a field from the datatable to the TextBox control.You can do this either at design time or in the code behind
After you have done this,just create an instance of the report,call the Run the method on this instance and then export the report document to PDF.
I would also suggest you to go through the following link which can help you achieve the same.
http://www.datadynamics.com/Help/ActiveReports6/arWLKCustomWebExporting.html
You can also download a sample application which converts a DataGrid to PDF report using Active Reports form here
ftp://ftp.fpoint.com/ActiveReports/Samples/GridToPdf.zip
Regards,
Abhishek Dutta
Grapecity
Related
I'm new to DevExpress and I created a .repx report using the RibbonReportDesigner. It's working fine in print preview reading from SQLite and loading the perfect design.
I saved the .repx file in project directory and changed its copy to output directory property to 'copy always'.
I have a button that should load this report, but I don't know what to do next and I couldn't find an answer online.
As shown in the attached picture I have a simple structure, Form1 takes several inputs from the user and generate a barcode, the barcode is well designed through RibbonReportDesigner but still I don't know the next step.
Another option that might better suit your needs would be to save the report to your project as a report class. Add a new DevExpress report object to your project and load your existing design from the .repx file.
When you want to print the document from your code, instead of instantiating a new XtraReport object and loading the layout from the .repx file, instantiate the CustomReport.cs class instead. Because your custom class is inherited from the XtraReport class, it will function the same and you can fill in your parameters like normal.
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.
Scenario:
I have an RDLC file - TestReport.rdlc
I have a form - Form1.cs
I have a ReportViewer - rptViewer
My datasource for the report will be an XML file or a datatable defined at run time (in button click event). Now when I am in design mode for the report how do I add the DataSource or DataSet to the report so I can "add" the columns/fields into the report?
Right now in the report when I click New -> DataSet I am asked to pick from Database, Service, Object or SharePoint but I want to use an object which exists in memory.
I am using VS2012.
Thanks,
Andrew
In case of XML, you have to create the schema for it and then add it to the report in the design view.
A little example is exaplained in this blog (it's old but still good to understand what you have to do).
If also the XML's schema is dynamic, the only solution I came out is about to create one paramater for each node/attribute of your XML and build one or more .rdlc files for every type of XML
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
I would like to use the Microsoft Report Viewer component to view a report created from a programatically filled datatable.
I have been looking for a while but the only information I can find is for reporting on information from a database.
You can definitely do that - if you programmatically control the Report viewer control (in Winforms or ASP.NET).
See these resources for some help and guidance:
MSDN: Creating Data Sources for a Report
ReportViewer Set DataTable as DataSource (VB.NET)
you can use visual studio to create and then deploy your report. After having created a project for Microsoft Reporting Server, you should add a datasource to it (this is to say where u want to connect to), then open report data view where you can create a query. This allow u to drag & drop fields on your report.
Hope this was what u intended to