Crystal Report Duplicate Lines PO

SUGGESTED

Hi,

I took the original PO report and modified to print the supplier notes from the supplier record. However, the report seems to be duplicating the lines. 

Original Report.

With the notes field added:

How can I fix it so it does not duplicate the lines.

  • 0

    Looks like a relationship issue with your tables. Can you post a screenshot of your table relationships from Crystal Reports? From Database Expert, the Links screen. (Then either arrange them so they're easy to see or click auto-arrange.)

    The point is the join is probably doing this, and I suspect that more filters need to be applied to the note. However I don't know what will happen if you have a supplier with no notes at all. (Then you might not get any rows at all.)

    If all you need is to put the supplier note on there, I'd use a subreport. It spares you from having to deal with all of the join business in the first place.

  • 0 in reply to JamesG-ACD

    Can you please advise on how I can go about doing that. My email is [email protected]. It would be great if we can connect on this issue. Please let me know.

  • 0 in reply to JamesG-ACD
    SUGGESTED

    1) To add a subreport, click Insert > Subreport. Give it a name and click Report Wizard.

    2) I assume you have a database connection. Browse through that to your schema and locate the NOTE table. Add the NOTE table.

    3) The note itself is the NOTE.NOTE_0 field. Add it and click Finish.

    4) You'll be back at the Insert Subreport window. Click OK and place it where you want it. Size it too to however big you want it.

    5) Right-click the new subreport and click Edit Subreport Links. I guess we'll link it via PORDER.BPSNUM_0. Add that field and click OK.

    6) Now right-click your subreport and pick Edit Subreport. It will open your subreport in a new tab in Crystal. Click the Select Expert and notice that BPSNUM_0 was added as a parameter. At this point you need to decide if you want additional filtering conditions applied to this, like (looking at the note in X3), the category or whatever-else. Add them here. You probably don't want a condition where you end up with multiple notes, but I guess that's up to you.

    7) Finally you need to format your subreport. Anything on there will print on the main report. So I hide the guidelines (as a starting point because I find them annoying), then suppress the header & footers. Format your title and whatever-else to your liking. (If you put the title in here and not on the main report, then it should be suppressed if you have a supplier that has no notes, rather than having the title with nothing under it. Up to you.)

    8) Save it and it should show up when you print it.

  • 0 in reply to Ancient Nutrition

    Ok, well the NOTE table would need to be related to something. Join PORDER.BPSNUM_0 to NOTE.BPSNUM_0 with a left outer join. But be aware if you have more than one note type and the potential for a supplier to have multiple notes, you'll get a line for each note unless you filter them by type in the select expert - but if you do that if you have noteless suppliers it won't show anything. This wouldn't work in my config but I don't know yours. That's why I suggest using a subreport instead.

  • 0 in reply to JamesG-ACD

    Are you able to connect via goto meeting and show me quickly how this can be done?

  • 0 in reply to JamesG-ACD

    Thank you for writing this up. Before I got this message. I was able to connect the report field with the bpsuppliernum. However, when I went to print it in the system. I got the message "report truncated"

  • 0 in reply to Ancient Nutrition

    So it looks like that whenever I have a note for the supplier it works. However, whenever I do not have a note i get this.

  • 0 in reply to Ancient Nutrition

    I still wouldn't expect it to work 100% right simply by adding the note table; and would suggest using the subreport. That being stated, I haven't seen this error before. What is the (page) size of the PDF? If you click File > Properties in Acrobat Reader, in the lower-left corner it'll say. (Is it some odd size?)

  • 0 in reply to JamesG-ACD

    I was able to do the left outter join and the error went away. But the duplication comes back when a supplier record has two notes. So I am back to square one.

  • 0 in reply to JamesG-ACD

    Thanks jamesG.. now i know how to put a subreport..