Solved

How to bind only 1 DataRow Object to the Report?

Posted on 2006-06-25
2
308 Views
Last Modified: 2008-02-26
Hi there,

I have a strongly typed dataset, now I want to display all the information of only 1 selected Row on the Crystal Report. Is there any way to 'bind' this object to the report? (not the passing parameters solution)

I've tried this ...

In VS2005, in the Report Designing page,
I added 1 Data Source of Type Object and chosed an DataRow object, then renamed it to "myDataSetName". Then I passed the Row need to be displayed using the following statement:

myReportViewer.LocalReport.DataSources.Add(new ReportDataSource("myDataSetName", myDataRowObject));

... but it gave me an ArgumentException:
Value does not fall within the expected range.

Anyone could help me please?
Thanks in advance,
pckben.
0
Comment
Question by:pckben
2 Comments
 

Author Comment

by:pckben
ID: 17024655
ok i found my own answer:
use a BindingSource object to bind to the specific DataRow, then
myReportViewer.LocalReport.DataSources.Add(new ReportDataSource("myDataSetName", myBindingSourceObject));
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 17025424
Closed, 125 points refunded.
GhostMod
Community Support Moderator
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question