473,657 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I populate Crystal Reports, using a DataTable?

Hi,

Can anyone tell me how I can populate Crystal Reports, using a DataTable in C#?

Regards,
Pierre
Nov 15 '05 #1
2 18855
pi***********@p sitek.com (Pierre) wrote in message news:<db******* *************** ***@posting.goo gle.com>...
Hi,

Can anyone tell me how I can populate Crystal Reports, using a DataTable in C#?

Regards,
Pierre


Pierre,

This is how you do it using OLEDB, and a table view in MSSQL. This assumes
you have setup your report viewer with the wizard.

-------------------------

dataSet21.Clear ();
oleDbDataAdapte r1.Fill(dataSet 21,"your_table_ view");

CrystalReport2 custReport = new CrystalReport2( );
custReport.SetD ataSource(dataS et21);

TableLogOnInfo logOnInfo = new TableLogOnInfo( );
logOnInfo = custReport.Data base.Tables["your_table_vie w"].LogOnInfo;
ConnectionInfo connectionInfo = new ConnectionInfo ();
connectionInfo = logOnInfo.Conne ctionInfo;
// Set the Connection parameters.
connectionInfo. DatabaseName = yourcatalog;
connectionInfo. ServerName = workstationID;
MessageBox.Show (connectionInfo .ServerName);
//connectionInfo. Password = "yourpasswo rd";
//connectionInfo. UserID = "youruserid ";
custReport.Data base.Tables ["Vw_Address_Lab el"].ApplyLogOnInfo (logOnInfo);
crystalReportVi ewer1.ReportSou rce = custReport;
crystalReportVi ewer1.Refresh() ;
crystalReportVi ewer1.RefreshRe port();
-----------------------
Nov 15 '05 #2
Hi Brent,

Thanks, but I am still have major difficulty getting Crystal Reports to
work properly.

I have three tiers i.e. ASP.Net, Business Logic Layer and the Data
Access Layer. I get the data back from an stored proc on a SQL 2000
database and then manipulate the DataTable in the Business Logic layer,
filtering out certain records, in order to obtain the data which needs
to be displayed on the report.

The problem I am having, is populating the unbound "fields" on the
actual report with data. The report is being displayed, but I cannot
find documentation on populating the actual fields.

Does anyone PLEASE know of a way in which I can do this?

Thanks,
Pierre

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
14267
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I am planning to pass a dataset to the report at runtime. From what I have read, it sounds like unbound fields might be the answer. However, I am having trouble figuring out how to bind these unbound fields to my dataset at runtime.
3
520
by: oscar | last post by:
is there a way of integrating mysql databases into the .net crystal reports? in the report wizard i have options for sql databases, but nothing for mysql. is there a plugin i'm missing for it? i've tried creating a dataset and filling it with the data from a mysql query, but it still does not show up in the wizard. i have also tried to create fields and import data to them, but there seems to be no way of accessing the crystal report...
3
3786
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so why is the bloody thing doing this. The paths have been checked and are correct. The crystal Report is a .rpt file. Not one created in the VS.net IDE but in crystal itself.
3
2866
by: Shawn H. Mesiatowsky | last post by:
I have come across lots of information regarding this, but nothing seems to work. I have created a Crystal Report that access's a SQL server backend for the data, and I want to display the report via a webform and the CrystalViewer Web Component. First of all, I have been using Trusted Connections so far (for data access) and really do not want to have some static login information in my web app. but most of the documents so far have...
7
34774
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their data from ADO.NET Datasets that are pre-populated by other modules of the application. What I need to do is to use these datasets as the datasources of my reports. Fine, I know how to do that and it works perfectly on my development box. The...
1
2482
by: Sachin | last post by:
Hi, I am working on ASP.Net 2.0 Beta 2 I am having problems creating crystal report using dataset I created a new dataset (DS_ExpCode) and a datatable (DT_ExpCode) under App_Code folder. Then i create a new crystal report A Standard Report Creation Wizard window popus up with available datasource I selected Project Data -> ADO.Net Dataset, i see the dataset recently
2
1482
by: touf | last post by:
Hi, I've a problem in a crystal reports report, the detail information is displayed 2 times. I'm sure that the dataset contains the true information because I see it in a datagrid so the problem in Crystal reports definition. Does someone have the same problem before, or know what can be the cause. thanks. In my dataset there are 4 datatables with no relation between them, and all the detail information is from one datatable.
5
2395
by: Jay | last post by:
I am getting mixed messages from the asp.net website hosting providers - some say they do not support Crystal Reports due to a $25,000 per cpu licensing fee, others say all I need to do is install Crystal Reports XI (about $500) on a dedicated server and it will run fine. Will Reports developed with the embeded Crystal Reports in VS 2005 run in a Crystal Reports XI environment? -- Thanks
1
1944
by: Brock | last post by:
Thanks for any help. I'm not new to Crystal Reports and use them routinely in vb.net for desktop applications, but I don't know where to start for using them in my asp.net apps. I currently have an .aspx page with a datagrid populated by two compliled DLL's which make the fields available to the datagrid with this code below. Should I have a popup screen that contains the ReportViewer from the toolbox? How can I in my crystal report set...
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.