Operation Manual

Printing, Exporting, and Viewing Reports
Viewing reports
20
Crystal Reports User’s Guide 407
Scenario 1
If your source report contains data (that is, if the report is in Preview view), the
Context Report Part data context (in the target report) is the source report’s
Preview data context for all children of the selected field. For example, you
might see this in the Data Context field:
/Country[USA]/Region[*].
Otherwise, the program uses the source report’s Design view data context as
the Context Report Part data context in the target report.
Scenario 2
If your source and target reports are the same report, and the object you
choose as your source is from the Preview view, when the target object you
choose to link to is in a higher level than the source object, the data context is
left empty. For example, when the source data context is
/
Country[Australia]/ChildIndex[5]
, and the target data context is /
Country[Australia]
, the Context Report Part data context is left empty.
Scenario 3
If your source and target reports are the same report, and the object you
choose as your source is from the Preview view, when the target object you
choose to link to is in a lower level than the source object, the data context
pasted is a Design view data context (in the form of a formula). For example,
when the source data context is
/Country[Australia], and the target data
context is
/Country[Australia]/ChildIndex[5], the Context Report
Part data context is
"/"+{Customer.Country}.
Cross-tabs
If the object you copy in your source report is part of a cross-tab, the Context
Report Part data context is based on the selected object embedded in the cross-
tab. Crystal Reports creates the data context by tracking if the selected object in
the cross-tab is a row, column, or cell. Next, the program retrieves row and
column names. Then it parses the Design view data context. Finally, it generates
the Context Report Part data context by adding the
GridRowColumnValue
function if the group in the data context formula appears in the row or column
names retrieved earlier. You might see, for example, a data context such as:
"/"+GridRowColumnValue("Customer.Country")+
"/"+GridRowColumnValue("Customer.Region")
Data context formats
Normally, a data context formula appears as follows:
"/" + {Table.Field} + "/" + {Table.Field}
You can also use these formats:
XPath-like format:
/USA/Bicycle