Solved

How to bind only 1 DataRow Object to the Report?

Posted on 2006-06-25
2
311 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

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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