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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining multiple rpts into one in CR9 1

Status
Not open for further replies.

olichap

Programmer
Mar 20, 2001
389
US
I'm hoping someone can point me in the right direction here. I've a medical claim report and need to set the data values. A good portion of the report's values I could set easily by simply binding/dropping the appropriate data field onto the proper place in the form.

However 23 lines of the report are given over to charges. There may be 1 or 23 when printed. The database attached to the report contains 8 dataset tables with relations set. With the exception of the Charges table the other 7 have a one-to-one relationship; Charges is a one-to-many.

I had to do something like this a few years back and decided to drop unbound text-boxes on the report, setting their values in VB at runtime. This worked when I was dealing with one record at a time; each claim form became its own print job.

I've considered doing it this way in VB.NET as well but want to handle the printing differently. I'd want to send a multi-page print job that contains a report object for each claim. Under CR8.5 there was a way to combine report objects when using the Viewer control. Idealy I would like to send the print job directly to the printer without user-intervention but if I have to use a similar (if it exists) method in CR9 to combine reports, I'll use the Viewer as well.

Hopefully I've explained this well enough. I'm not locked into any one programming plan but am obviously having my train of thought affected by how it was done in the past.

If anyone has suggestions on how I can accomplish this sort of thing I'd appreciate the input.

Thanks,

Oli
 
Ok, I figure I should be able to do this if I add each claim-report to a main document as sub-reports.

So my question then becomes how can I add multiple sub-reports in CR9/VB.NET so that each will take up a full page? And how would I iterate through each?

Thanks,

O.
 
Not sure why you need subreports simply because of a one-to-many relationship. Link your charges table to the others and group them by the "ONE" field in the "One to many" relationship. I will assume that this is the claim number.

Then your details section is where you put the 1-23 charge information and the group header / group footer is where you put everything else.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Thanks Ken,

I looked at doing this but am unsure whether it'll work for me. Can you think of way I can work it so that, regardless of the number of charges, I'll always have 23 charge lines? If there are two charges I will need 21 blank lines to appear on the form (it's a standard form where I've had to line up the data items so they appear in the proper places).

Also, if there are 24 charges I need to somehow continue on a new form/page (23 on one, 1 on the other). So if I had 200 claims to print 5-6 may be 2-3 pages long.

Any ideas?

Thanks again,

Oliver
 
Size your page header and page footer so that only 23 lines fit between them on the page, and so that they are at the proper position. CR will automatically split to the next page after 23, 46, etc.

If you have a page break after every group, the last page will have empty space between the last record and the page footer.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top