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!

Sub report linking ???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
I'm trying to link sub report fields to a couple of fields in the main: Date range(MTD) and employee ID. I've tried to use the sub link option and it keeps showing only the ID. Does it only allow you to link one field from the main? Is there a way to link multiple fields with the sub link option?

Thanks Paul
 
The data types must be the same type, but it will allow multiple links.

You can check what Crystal believes the data types to be by right clicking each field and selecting Browse Data.

If they differ, then you need to shave your dba's skull with a chain saw, then try to create a View on the database which CASTs or CONVERTs the data types to a standard type.

If that isn't an option, you may be forced to use subreports and convert one or the other field to the other's data type and link to the formula. This will be MUCH slower though.

-k
 
k

They are both the same field type, luckily, because the dbs is a lot meaner than I am! I'm trying to link a date range, but it only uses the last date in the range to run the sub report. The main runs MTD, so I would like to link MTD too. I know I can change the the Select Expert for the sub to MTD, but having a few sub reports it would be easier to change the range one time in the main instead of all the reports if I need if for different date ranges.

Paul
 
Your first post states that you can't link, the second states something else.

By MTD do you mean that you are pulling data for Month To Date?

You don't LINK by where clause criteria, you link by fields. You use the select formula to filter rows, so if you need them filtered by a certain date period, create a parameter in the main report for the dates to be pulled, and then link that parameter to the date fields in the subreports.

A common thing is for people to design reports with the following:

Main report:
Range parameter linked to a date field.

Subreports
Main report Range parameter linked to a date field.

-k
 
k

Thanks for your help!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top