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

Subreport Linking Problem

Status
Not open for further replies.

nikol

Programmer
Apr 12, 2005
126
US
I have 4 subreports with 3 parameter fields(Cities,Advisor & Daterange). When I tried to link the report by selecting "Fields to link to" with 3 parameters. i can see City & advisor fields from subreports in "Select data in subreport based on field" But when I select "date range" parameter & add to "Fields to link ,I Cant see the "Date Range" parameter field in "Select data in subreport based on field"..Any Help..
 
They're probably a different type of date field, one being datetime, the other just date.

At any rate, don't build parameters for the subreport, link the main report parameters to the actual fields in the subreport.

If you're using a date range as a parameter in the main report, you'll have to go manually edit the subreport->Edit Selection Formaul->Record to allow for the

{table.date} >=minimum{?daterange})
and
{table.date} <=maximum{?daterange})

-k
 
I'm still not getting the correct output.
I created a date_range parameter in the main report. I cant see date_range field in "select data in subreport based on field" Report field is all blank.
 
Then the subreport doesn't have the same datatype for the field you're trying to link by.

Your posts have very little information in them, try including technical details:

Crystal version
Database/connectivity
Example data (show the fields and types)

Are you using a date parameter, or a datetime parameter?

You may be able to create a SQL Expression ni the subreport to CAST/CONVERT your field to the same data type as the paarmeter, or make the parameter the same datatype as your field.

Right click the field in the subreport and select Browse Field to learn it's type.

-k
 
I'm using datetime type parameter. Both subreport & main report entry_date are of same data type.I have written
({Command_3.entry_date} >= Minimum ({?Date range})
and
{Command_3.entry_date} <= Maximum ({?Date range}))
in the selection formula for the main report.

&
({Command_7.entry_date} >= minimum ({?Pm-?Date range})
and
{Command_7.entry_date} <= maximum({?Pm-?Date range}))

in subreport selection formula. Now I can see the entry_date field in the 'change parameter link" but my output is still wrong.. Is there anything I have to do with my formulas

 
I got it. Thanks for ur help..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top