Solved

How to bind only 1 DataRow Object to the Report?

Posted on 2006-06-25
2
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

752 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