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

Problem in linking subreport through formula

Status
Not open for further replies.

sds786

Programmer
Aug 15, 2007
49
US
I am using Crystal XI, In order to get employee details I just created one parameter as EmpId and created a subreport to get employee name from employee basic table, that name I put in a shared variable and that share variable placed in the main report headers.

Then in order to get employee details I created a new subreport and place in the report group footer, and then in order to verify my formula value I created one shared variable in new subreport and placed there, It showed in both places but when I linked that subreport with employee name in the subreport table it doesn’t show any record, even I do have records there. I could not figured out why it’s not creating good link between main report and subreport.
I double checked the records in subreports by hard coding that specific employee name in the subreport and it shows the data there. I will appreciate any solution.
 
I can't follow this:
It showed in both places but when I linked that subreport with employee name in the subreport table it doesn’t show any record, even I do have records there.
Please clarify which subreport, and what you are trying to link with what. Also show formula contents.

-LB
 
I have employee name ‘David’ (only 1 word) in the formula which is placed in the main report, my subreport contains the table ’ employeedetail’ that have more than one records of the ‘David’, when I checked this table through sql query it show many records of David but when I linked that subreport with my main report formula having name ‘David’ it doesn’t show any records, let me know please if you still need more details. Thanks for your help.
 
Check the record selection in the subreport. One thing that can happen is that a link made in the main report will generate a selection condition you don't want.

If that's not it, post the subreport selection, both the Crystal code and its SQL.

I'm assuming you are looking for one-word values, e.g. the record field would say David rather than Mr David Slingshot. If not, you'd need LIKE or some similar command.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
How does the formula in the thread title fit in? What is the relevance of the shared variables that you mention? Maybe there is a difference in case? Or there is a space in one field? Try linking on two formulas like:

ucase(trim({table1.name}))->ucase(trim({table2.name}))

-LB
 
Thanks for both of you guys (Madaws and LB), Actually I got busy in an other hotfix on the server and could not check your suggestions, I will check as soon as I manage time.
Really appreciate your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top