Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the problems related to the Visual Studio 2005 plug-in

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you questions about how to analyze the Visual Studio 2005 plug-in. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

First of all, I think this is a very useful plug-in, if it continues to be improved and enhanced, I think it will be used by more developers. The study of the Visual Studio 2005 plug-in source code is very helpful for us to master how to correctly create the Visual Studio 2005 plug-in project, and we can also learn a lot of programming skills, such as delegation and template methods.

The first part completely binds the data source with control.

1. To create a crystal report, pay attention to the report using OLE DB ADO to connect to the data source, so that you can save the pop-up of the report login window.

two。 Drag the report control CrystalReportViewer in the design view, click the intelligent tab in the upper right corner to set the report data source, select the report file, and automatically generate CrystalReportSource, then the report interface will be displayed in the design view, and the crystal report will automatically fill the report field with initial data. Note that there is a small Bug. If the report is in a subdirectory, selecting the report file will automatically be represented by a relative path. At this time, the report display will make an error and should be changed to an absolute path.

This should be changed to:

3. Drag and drop a data source control SqlDataSource (you can also use ObjectDataSource), and the Visual Studio 2005 plug-in generates the data source according to the wizard, where you can filter the data and select various data sources according to the situation.

Detailed explanation of Visual Studio 2010 Agile Test-driven Development

Illustration of Visual Studio 2008 environment description

Analysis of the performance of Visual Studio 2008 programs before and after upgrade

Summarize Visual Studio Team System and its attention

Users evaluate Visual Studio products

4. How to connect the CrystalReportSource and SqlDataSource controls together? You can go like this: select the CrystalReportSource control, click on the data bar in the properties on the right, then click Report to select DataSource, and then select the data source in the data source collection editor to specify the report name. (the following Parameters is used to select report parameters.)

You can also refer to the second part of the http://xy229935.spaces.live.com/ Visual Studio 2005 plug-in for its essence.

The second part binds the data source with code

Using push mode, the Visual Studio 2005 plug-in can use the above designed report format and use DateTable as the data source of CrystalReportViewer, which is more flexible. You can delete the above CrystalReportSource and SqlDataSource. The specific code is as follows (note that the connection method of OLEDB should be used):

DataTable DS = new DataTable (); string myConn = System.Configuration.ConfigurationSettings.AppSettings ["Test_OLE"]; OleDbConnection myConnection = new OleDbConnection (myConn); string strSql = "select * from talbe1"; OleDbDataAdapter myDataAdapter = new OleDbDataAdapter (strSql, myConnection); myDataAdapter.Fill (DS); CrystalDecisions.CrystalReports.Engine.ReportDocument CrystalReportSource; CrystalReportSource = new CrystalDecisions.CrystalReports.Engine.ReportDocument (); CrystalReportSource.Load (Server.MapPath ("..\ query\ CrystalReport_kqhz.rpt"); CrystalReportSource.SetDataSource (DS) This.CrystalReportViewer1.ReportSource = CrystalReportSource; this.CrystalReportViewer1.DataBind (); these are the questions about how to analyze the Visual Studio 2005 plug-in shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report