I have never created any report in VS, now i am facing problem in adding reference to my project.
Can any one tell me the basics of Report Generation and How to add reference to our project?
The purpose of report generation is to take data from a source such as a database, XML stream or a spreadsheet, and use it to produce a document in a format which satisfies a particular human readership.
Please refer ComponentOne HelpCentral for Active Reports for topics to get started with ActiveReports.
Features of Report Generation with c# .NET:
Multiple Report Types to Fit Your Reporting Needs: Fixed Page Layout provides developers with a new way of creating reports where layout is the primary focus. Great for creating invoices, prospectus reports, forms, or other highly structured reports.
Continuous Page Layout makes it easy to create reports using tables, crosstabs, charts, and other data regions with flexible layouts.
Data Visualization: This include simple listing or groups with keep-together control, master-detail reports, sub-reports, horizontal and vertical multi-column reports, address labels and badges, or richly formatted letters with mail merge support. Simple and lightweight report controls allow you to easily create dazzling reports.
Data Binding .NET data sources allow you to connect to any of the standard databases, plus .NET in-memory objects and collections. In addition, the unbound data mode opens up the report to data from anywhere, in any form. If your application can access it, so can the report engine.
Visual Studio Integrated Design Time Support
Support for Migration from Other Reporting Tools
Global Options and Localization Support
Basic Steps in Report Generation with Active Reports:
This walkthrough is split into the following activities:
To add an ActiveReport to the Visual Studio project
Create a new Visual Studio project.
From the Project menu, select Add New Item.
In the Add New Item dialog that appears, select ActiveReports 8 Page Report and in the Name field, rename the file as rptMasterDetail.
Click the Add button to open a new fixed page report in the designer.
To connect the report to a data source
In the Report Explorer, right-click the Data Sources node and select the Add Data Source option or select Data Source from the Add button.
In the Report Data Source Dialog that appears, select the General page and in the Name field, enter a name like ReportData.
On this page, create a connection to the Reels database. See Connect to a Data Source for information on connecting to a data source.
To add a dataset
In the Report Explorer, right-click the data source node and select the Add Data Set option or select Data Set from the Add button.
In the DataSet Dialog that appears, select the General page and enter the name of the dataset as CustomerOrders. This name appears as a child node to the data source icon in the Report Explorer.
On the Query page of this dialog, in the Query field enter the following SQL query.
SELECT CustomerID, Title, LastName, Quantity, Price, [Quantity]*[Price] AS
Total FROM CustomerOrders WHERE CustomerID < 1010
Click the Validate DataSet icon at the top right hand corner above the Query box to validate the query.
Click OK to close the dialog. Your data set and queried fields appear as nodes in the Report Explorer.
4.Create a layout for the report
5.To view the report
Click the preview tab to view the report at design time.
or
Open the report in the Viewer. See Using the Viewer for further information.
To add a reference in Visual C#
In Solution Explorer, right-click the project node and click Add Reference.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, and then click OK.
Related
I was wondering if it is possible to catch or customize the "New Document" action in the ribbon when you create a new document in a document library.
The reason is the following: I would like to fill in some data into the document (pragmatically through the properties) before it opens in Word. This way some default data is filled in for the user. What data is filled in depends on the Site name. This would represent a Project number, what would be used to get the specific data from a list or database.
I've come up with some other solutions that basically fill in the data, but at another point of the process of the document:
using a combination of a Workflow & filling in the data through InfoPath. This works for a library with only 1 content type (the default). Once we want to use multiple Content types it is nearly impossible to get the site name because InfoPath is not able to use the function SPContext.Current.Web.Title.
To solve the content type problem I used the Event Receiver "ItemAdding". This way the data is added when the document is being added. The disadvantage that this gives is that the data will only be visible in the document if the users opens it a second time, what isn't really user friendly.
So to optimize the user experiences and usability I would like to add the data before the document opens in word. But is it possible?
I'm using SharePoint 2010 Server, Office 2010 Professorial and Visual studio 2010 Ultimate.
Thanks in advance,
Oxillery
I am using Crystal Reports with C# programming language.
I want to open another report by clicking on link eg. I show Invoice's Summary like its number (named InvNo), date, items and TotalAmount.
Now I would like to open another report when user clicks on InvNo column. If user clicks on Invno 0001 then another report should be opened showing Item-wise details...
Is there any solution for this?
There are two 'linking' options:
use an 'on-demand' subreport - this is a report embedded in another report. it is NOT generated until its link is clicked. 'standard' subreports are generated at the same time as the 'main' report. in either case, a subreport can NOT contain another subreport.
create a hyperlink to another report by setting a field's Hyperlink property (choose the 'A Website on the Internet' option). if you create a conditional formula (the 'X+2' button), you'll have more control over the URL that is generated. you'll probably want to create a controller page (like 'view_report.aspx') that parses the querystring for the report's id (id=234), opens the report, authenticates, add parameters (country=USA®ion=MN&start_date=20110501), generates the report, then returns it.
Use option 1 for the summary, then use option 2 for the item's details.
If you are using BusinessObjects Enterprise, use UrlReporting for option 2.
I believe subreports functionality is an answer to your question.
You would need to enter a formula that conditionally shows/hide them (they should be hidden by default). Unfortunately I cannot tell you how to do that from the back of my head, since I haven't worked on CR for pretty long time now... Please find few links here.
When I print my crystal report, it will not print the correct (most recent) database view. To get it to print the correct one, i have to manually select "set datasource location" and then click on the tables i want and then click update. If i don't it will keep printing the same old view over and over.
I do have the "verify on every print" option selected but it doesn't seem to work.
I am using VS2010 with the beta crystal reports for vs2010 and ODBC 5.1.
Thanks
It sounds as though you have the Save Data with Report option enabled. Try opening the report in the report designer, and see whether there is a tick on the File menu next to the Save Data with Report option - if so, uncheck it, save the report and try again.
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