Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports .net DataTable relations

Status
Not open for further replies.

LikePork

Programmer
Aug 13, 2004
42
CA
Hey, I'm new to Crystal Reports and having difficulties getting help with what I'm trying to do, but I bought Brian Bischoffs book and am working on it. I'm using the Crystal Reports packaged with .net(is this the right forum uhoh) and I'm creating a report using an ADO.net dataset that I filled manually from a few different sources.

My dataset has several tables, so I'm using groups in my Crystal Report to represent the child relations in the table , so there is a "report"(not a new report object, just a different heading in the same viewer) for every row in my first Table(I'll refer to it as ErrorReports), then several pages for each row in it's child Table(referred to as Report). This works fine but after this I run into problems as the Report Table has more than one child relation, so what I want to do is have all the data from one child Table written out then on a new page all the data from the next child Table. I can't make a group for each because the groups must keep thier structure such that any new group is contained in the by the last newest group(I'm not really sure how to explain this, the "smallest", "most specific") so that no group can contain 2 unrelated groups, they must contain one group that may contain a group itself. So I hope someone understands what I mean there.

Anyway I have considered using a subreport but I'm not sure how to refernce the specific Report rows children rows so that the subreport is in the right place.

, I've tried to split the groups into sections but this seems to really do nothing, when it fill the data it just puts the sections together as if they were one, and since the 2 child Tables contain different amounts of rows it really can't work this way. Any other suggestions would be greatly appreciated, I can never find any info about reports using "complicated" Relations like mine

Please respond if you'd like clarifications, I wouldn't be surprised, or if I'm in the wrong place here. Any help would be useful thanks a lot.
 
Hi,
I wonder if you can show us a simple example of what it might look like using real world items. For instance, as I was reading your explanation, I kept thinking of the froups found with automobile manufacturers:
Chrysler
PT Cruiser
PT Cruiser
PT Cruiser Convertible
Pacifica
Pacifica
Town & Country
Town & Country Limited
Town & Country EX
Ford
etc.

If I'm on the wrong track, can you help clarify it for us?

HTH, [pc2]
Randy Smith, MCP
California Teachers Association
 
Wow, I was such a newbie when I had that question. My problem was that I didn't understand how the grouping worked in CR, and I tried to fit a DataSet I had into Crystal, instead of designing a new dataSet to then fit inot Crystal. Considering your example, the groups I had were more like
Cars

Chrylser Engine Speed Torque
Chrylser Engine Speed Torque
Chrylser Engine Speed Torque

Ford Weight Height Length Width carraying capacity
Ford Weight Height Length Width carraying capacity
Ford Weight Height Length Width carraying capacity

Honda Spoilers Tinted Windows Tin Can Exhaust
Honda Spoilers Tinted Windows Tin Can Exhaust
Honda Spoilers Tinted Windows Tin Can Exhaust

Trucks
Ford
F-150 size weight
F-150 size weight
F-250 size weight

and so on..

but I solved by creating an entirely new dataset and refitting my data into it. This seems to be one of the weakneses of using this method, you have to design a dataset to fit Crystal as it's difficult to fit a Dataset into Crystal. Also I made use of a few subreports to handle situations when child relations couldn't be avoided through re-design of the data set. Thanks for responding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top