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

Very Simple Question - Showing Parent Name rather than ID

Status
Not open for further replies.

nells1

Programmer
Mar 17, 2003
28
CA
Hi All

I'm BRAND new to Crystal so I apologise for this question. :eek:)

How to you go about showing parent information on your reports??

My report is based on a table in my dataset "Jobs". Jobs has a CustomerID that links it to "Customers" (also a table in my dataset). I want to show the Customer's name rather than the ID that resides in my Jobs table.

I do not have an option for SQL fields which seems to be related to using a Dataset as my datasource.

Any help would be great :eek:)
 
Hi nells,

In order to see a field value from another table - both the "Jobs" and "Customer" table must be in your report with the tables linked by Cust_Id.

Then open the Customer table in your Field Explorer within Crystal - find the Customer Name field and drag in on your report!

Hope this helps

paulmarr
 
Hi Paulmarr

Thank you for your prompt reply. I have tried what you suggested previously. It gives me the error:

"Query Engine Error: [path to the temp .rpt file]"

So I assumed it was incorrect. Infact when I add any links to the Visual Linking Expert diagram it produces the same error.

When I was running a report directly off the SQL server database, the links were fine. Is it because I'm building the report off a dataset schema and setting the datasource to the filled dataset when I load the report?

Have you ever had this problem?

Thanks again
Nells
 
Sorry Paulmarr

I forgot to mention that the error appears at runtime before the report is displayed in the viewer on my Windows form. The report is never displayed after the error.

:)
 
Problem solved!!

I was having a wee play around and it seems that the auto link was putting the link in the wrong direction?!?!?! When I re-linked it the other way BINGO.

Thank you for your time, I've been trying to figure this out for ages <blush>

nells
 
Hi nells,

A tip for you - the auto linking or "smart linking" as it once was called is not smart at all - it will link any field that has the same name and data type!

Always link your tables manually!!!!

Cheers,

Paul
 
Yes it would seem so :eek:) Point definitely noted!

I'm still having a wee problem but have put it under a new thread as it is no longer valid under this post.

Would you mind taking a look at thread766-864557 just incase you have any ideas :eek:)

Thank you very much
nells
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top