Hi All,
I've been going through various threads trying to figure out some things with Crystal/VB6. I have seen a lot of reference made to the above book by George Peck. Well, I went out and bought the book. Here is my review.
The short version: It's a waste of money if you need a reference for programming Crystal in VB. If you really need to waste your money, mail it to me!
The long version: I bought the book after flipping through it, and what I saw in terms of areas covered and sample code...well I thought it would be enough to get me through. Not.
Of the 776 pages, only 125 are actually dedicated to any type of VB development. And those meagre 125 pages do not provide the information really needed. The sample code provided does not seem to work in the real world. Maybe I'm not doing something right (I've been programming in VB for over 5 years now...so I have some idea of how VB works). But as an example, when trying to pass a recordset to a report, Peck recommends using the "SetDataSource" method, defined as:
object.SetDataSource data, DataTag, tableindex.
Ok, say I'm using ADO 2.5, I've created a connection, a command and a recordset object. I make my connection, send my command and assign the results to my recordset, rs. I should be able to use:
Report.SetDataSource rs, 3 ,1
Nope.
After querying the Crystal Support web page, I got the code I actually needed. You need to pass the connection and the command objects to the report:
Report.Database.AddADOCommand connectionobject, commandobject
Granted, I was using Unbound fields on my report using the VB/Crystal RDC. Peck doesn't do a very good job in describing this part either.
As for subreports....forget it!
I didn't find any reference to linking data between the main and subreports.
Using Memo Fields? If you look in the index for Memo fields, it points to the "crystal" section of the book (all the pages prior to the last 125 pages) and says that Crystal will print memo fields, but you cannot use them in a formula. That's fair. But, how do you deal with a memo field when your data source is dynamic (user can choose from a number of different databases in the same format) and you're using unbound fields in the RDC. If you bind the field from your data source to the unbound string field, you get a "memo fields cannot be used in a formula" error message. It takes a bit of work to figure that one out as well...
In summary, the book is very detailed in regards to creating reports using Crystal 8.5. If you're using standard or professional, no problem. If you want to do development - and not even really push the envelope too much - you're wasting your money on this book. I would recommend going to the Crystal support web page and do searches on the knowledge database --> (
Or, if your money is burning a hole in your pocket you can either a) mail it to me or b) pay an over-priced consultant to do the work for you!
Choose a) ...it's better for me too!
I've been going through various threads trying to figure out some things with Crystal/VB6. I have seen a lot of reference made to the above book by George Peck. Well, I went out and bought the book. Here is my review.
The short version: It's a waste of money if you need a reference for programming Crystal in VB. If you really need to waste your money, mail it to me!
The long version: I bought the book after flipping through it, and what I saw in terms of areas covered and sample code...well I thought it would be enough to get me through. Not.
Of the 776 pages, only 125 are actually dedicated to any type of VB development. And those meagre 125 pages do not provide the information really needed. The sample code provided does not seem to work in the real world. Maybe I'm not doing something right (I've been programming in VB for over 5 years now...so I have some idea of how VB works). But as an example, when trying to pass a recordset to a report, Peck recommends using the "SetDataSource" method, defined as:
object.SetDataSource data, DataTag, tableindex.
Ok, say I'm using ADO 2.5, I've created a connection, a command and a recordset object. I make my connection, send my command and assign the results to my recordset, rs. I should be able to use:
Report.SetDataSource rs, 3 ,1
Nope.
After querying the Crystal Support web page, I got the code I actually needed. You need to pass the connection and the command objects to the report:
Report.Database.AddADOCommand connectionobject, commandobject
Granted, I was using Unbound fields on my report using the VB/Crystal RDC. Peck doesn't do a very good job in describing this part either.
As for subreports....forget it!
I didn't find any reference to linking data between the main and subreports.
Using Memo Fields? If you look in the index for Memo fields, it points to the "crystal" section of the book (all the pages prior to the last 125 pages) and says that Crystal will print memo fields, but you cannot use them in a formula. That's fair. But, how do you deal with a memo field when your data source is dynamic (user can choose from a number of different databases in the same format) and you're using unbound fields in the RDC. If you bind the field from your data source to the unbound string field, you get a "memo fields cannot be used in a formula" error message. It takes a bit of work to figure that one out as well...
In summary, the book is very detailed in regards to creating reports using Crystal 8.5. If you're using standard or professional, no problem. If you want to do development - and not even really push the envelope too much - you're wasting your money on this book. I would recommend going to the Crystal support web page and do searches on the knowledge database --> (
Or, if your money is burning a hole in your pocket you can either a) mail it to me or b) pay an over-priced consultant to do the work for you!
Choose a) ...it's better for me too!