Skip to Content
author's profile photo Former Member
Former Member

multiple datasource in crystal reports

Hi There,

I dont have much experience with crystal reports so please bear with me until I get this issue resolved.

I have been given a task to create a report with following table from different datasource (ODBC). It is a pervasive database.

Datasource1

Tables are:

PODetail - JobNo, PONo, Desc, Client

POHeader - PONo, City, Address

Datasource2

Tables are:

Job-Master - JobNo, PM

I have added the tables in crystal report and created the links between tables. The problem is that JobNo in tables Job-Master and PODetail is in different format. For example:

PODetail.JobNo is 1-100, 1-101, 2-102

Job-Master.JobNo is 100, 101, 102

Now, the good thing is what really matter is the number after "-" (dash) and thats the job number. Anything before dash is for state. Every job number is unique and that is what I have been told.

Anyway, I can use mid function to sort the jobno issue. So I tried that by adding following fields but no records and in fact whole report just hangs.

I chose fields PODetail.PONo, Job-Master.PM and new formula field created by using Mid (Job-Master.JobNo,3)

Can someone please suggest me what I am doing wrong here?

Thanks

Angad

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2012 at 05:04 AM

    I must change the title of my question to following:

    Creating join between two tables and each table from different datasource. and

    Datasource1

    Tables are:

    PODetail - JobNo, PONo, Desc, Client

    POHeader - PONo, City, Address

    Datasource2

    Tables are:

    Job-Master - JobNo, PM

    I have added the tables in crystal report and created the links between tables. The problem is that JobNo in tables Job-Master and PODetail is in different format. For example:

    PODetail.JobNo is 1-100, 1-101, 2-102

    Job-Master.JobNo is 100, 101, 102

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 11, 2012 at 01:55 PM

    Hi Angad,

    If you've linked on the JobNo field then it won't work. Although their datatypes might match, however their contents do not.

    Either create a command object that strips out everything before the dash and then join on the JoBNo or use a Subreport. The Subreport will connect to one of the datasources and you need to create a report level formula that will strip out the JobNo for you which can then be linked to the other datasource's JobNo.

    - Abhilash

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Share Your Knowledge in SCN Topic Spaces

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 11, 2012 at 11:34 AM

    Hi Angad,

    u can try right (Job-Master.JobNo,3) in your query

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.