简体   繁体   中英

without data source assign in crystal report with visual studio 2008

I am studying crystal report with visual studio 2008. I knew OLEDB, ADO.Net And ADO connections etc. But whatever connection that we must assign data sources. I want to non-configured and assign data sources as like data-grid. In the data-grid, we can configure data field name and generate data assignation in runtime. Can I do this for report or not. If I can this, tell me how can I do this.

You can configure it in SQL with the use of a stored proc pass the values to SQL at runtime and your SQL Query in your stored proc vill pass the values in table form or you can set your datasource in VS2008 to be set to a datasource of your choice , Datatable etc. Using a stored proc all depends on your knowledge of CR though as it can get tricky in terms of changes after you have created your report.

Im not sure what language you are coding in but you can just work out the other code from here:

http://www.codeproject.com/KB/vb/Crystal_Rpt__Connectio.aspx

or something like this:

ReportDocument report = new ReportDocument() ;
report.Database.Tables[0].SetDataSource(employeeList );         
report.Database.Tables[1].SetDataSource(employeeSkillList );          crystalReportViewer1.ReportSource = report;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM