473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

supplying different business objects as data to crystal reports

hi,

I posted here earlier with a great reply:
http://www.microsoft.com/communities...044&sloc=en-us

Something like this works nicely:
List<Personps = new List<Person>();
ps.Add(new Person("Gideon",15));
CrystalReport11.SetDataSource(ps);
crystalReportViewer1.ReportSource = CrystalReport11;

After adding this class to the database expert I can link Persons properties
to the report.

Now what if I have
class AccountLine{
Description
Amount
Date
}

I make a crsytal report the same way as I did above it works fine, I can
make a report with list of payments .

NOW, I need to add a total on the *bottom* of the whole list, so if the list
of payments if four pages long, the total should be at the end of the fourth
page, so I made:
class Total{
Amount
}

But if I add it to the database expert it doesn't work at all, even the
AccountLine data doesn't show up.

Is there no decent way of making fields in the report and specifying the
data that goes in there.

I hope my quesition is clear.

Thanks so much

Gideon

Oct 18 '08 #1
4 3010

Unforunately, one work around I've seen is

Create a strong dataset.
Loop over your custom business objects / collection and populate rows in the
strong dataset.
Add your aggregate data to a different table in the strong dataset.
Use that as the CR datasource.
(Oh yeah, create your report against the XSD of the strong dataset)

Yeah, that sucks.

ActiveReports has a much better implementation.....it allows binding to
IList(s).


"giddy" <gi***@discussions.microsoft.comwrote in message
news:0A**********************************@microsof t.com...
hi,

I posted here earlier with a great reply:
http://www.microsoft.com/communities...044&sloc=en-us

Something like this works nicely:
List<Personps = new List<Person>();
ps.Add(new Person("Gideon",15));
CrystalReport11.SetDataSource(ps);
crystalReportViewer1.ReportSource = CrystalReport11;

After adding this class to the database expert I can link Persons
properties
to the report.

Now what if I have
class AccountLine{
Description
Amount
Date
}

I make a crsytal report the same way as I did above it works fine, I can
make a report with list of payments .

NOW, I need to add a total on the *bottom* of the whole list, so if the
list
of payments if four pages long, the total should be at the end of the
fourth
page, so I made:
class Total{
Amount
}

But if I add it to the database expert it doesn't work at all, even the
AccountLine data doesn't show up.

Is there no decent way of making fields in the report and specifying the
data that goes in there.

I hope my quesition is clear.

Thanks so much

Gideon

Oct 20 '08 #2


"sloan" wrote:
>
Unforunately, one work around I've seen is

Create a strong dataset.
Loop over your custom business objects / collection and populate rows in the
strong dataset.
Add your aggregate data to a different table in the strong dataset.
Use that as the CR datasource.
(Oh yeah, create your report against the XSD of the strong dataset)

Yeah, that sucks.
Thanks!
ActiveReports has a much better implementation.....it allows binding to
IList(s).
(Was more happy about this answer)
Active reports huh? Think its better when it comes to feeding business
objects? I mean, can I just reference business objects or better yet create
place holders and fill them up on my own?
The product does look good, but does it have some muck ups like CR?

(Should have posted a thread here asking for CR alternatives)

Thanks so much

Gideon
Oct 21 '08 #3

I can only add this:

I hate Crystal Reports.

I like Active Reports.

//Think its better when it comes to feeding business
objects?
Yes. It was better 4 years ago, and has only gotten better.

The dll deployment is pretty easy.

The last version I used, you had to do a

ActiveReport.SetLicenseKey "ABC123ABC123ABC123ABC123ABC123ABC123" ; << Where
this was a key given to you(your company).
That was the only snapfu with them at all.
Crystal Reports would be alot better if you could turn OFF the "Pull" model.
Too much hacking with that model.

The PUSH model is better with CR, and I can live with it when I have to.

But ActiveReports are much better.


"giddy" <gi***@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
>

"sloan" wrote:
>>
Unforunately, one work around I've seen is

Create a strong dataset.
Loop over your custom business objects / collection and populate rows in
the
strong dataset.
Add your aggregate data to a different table in the strong dataset.
Use that as the CR datasource.
(Oh yeah, create your report against the XSD of the strong dataset)

Yeah, that sucks.

Thanks!
>ActiveReports has a much better implementation.....it allows binding to
IList(s).
(Was more happy about this answer)
Active reports huh? Think its better when it comes to feeding business
objects? I mean, can I just reference business objects or better yet
create
place holders and fill them up on my own?
The product does look good, but does it have some muck ups like CR?

(Should have posted a thread here asking for CR alternatives)

Thanks so much

Gideon

Oct 21 '08 #4
I can only add this:

I hate Crystal Reports.

I like Active Reports.
I would have to agree, active report has a MUCH better model. Although, I
didn't find any docs on their model and its sad they didn't just add XML
comments, would be easier to figure things out. Also, v3.0, it seems has no
external files, the whole report is a class.

But! Alas! I can't possibly afford it! The App I'm building costs a fraction
of Active reports price tag!
I guess I'll have to stick to CR! Your dataset solution worked nicely.
Sadly, CR doesn't even have a way a printing a table(grid with borders).

Thanks so much

Gideon
Yes. It was better 4 years ago, and has only gotten better.

The dll deployment is pretty easy.

The last version I used, you had to do a

ActiveReport.SetLicenseKey "ABC123ABC123ABC123ABC123ABC123ABC123" ; << Where
this was a key given to you(your company).
That was the only snapfu with them at all.
Crystal Reports would be alot better if you could turn OFF the "Pull" model.
Too much hacking with that model.

The PUSH model is better with CR, and I can live with it when I have to.

But ActiveReports are much better.
Oct 22 '08 #5

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

Similar topics

0
by: Charlie | last post by:
Hi, We have a set of .NET objects handling the business layer of our application. Is it possible to bind the objects directly to a Crystal report so we can see the properties at design time in...
0
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
5
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...
6
by: satyamedicherla | last post by:
Hi All, We have more than 50 Crystal Reports (Implemented) in our project. Please let us know how to implement Cascading Style Sheet to Text Objects and Line Objects in Crystal Reports and...
3
by: Mudcat | last post by:
I am not that familiar with Crystal Reports, but having read some other posts I know that the way to integrate the API with Python is through the COM interface provide by win32all. However, I...
1
by: =?Utf-8?B?VGVycnk=?= | last post by:
I am brand new to using Crystal Reports and am trying to generate a report based on a custom object - in another project. I have a layered design, with all my business objects in a seperate...
3
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
6
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
4
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.