cancel
Showing results for 
Search instead for 
Did you mean: 

Previewing an Invoice before adding it

Former Member
0 Kudos

Hi Experts,

I've replaced all the standard marketing documents (PLD's) with Crystal Reports versions.  Now I've found something the old PLD's can do that my reports can't.  When you copy a Delivery to an Invoice and then click print preview before you add it, the PLD report actually shows the correct invoice data while my crystal report fails with invalid invoice number or shows the completely wrong invoice.  I understand why mine doesn't work because the invoice isn't actually in OINV yet and my Command SQL statement in CR looks in OINV for {?DocKey@}.  Can anyone tell me how the system PLD version shows the correct information?  Is it transferred directly from the form some how?  Is there a way to make it work in CR?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

Thanks Rahul,

At least I learned about the ODRF table, but its behavior is sporadic at best.  Sometimes a new entry shows up in ODRF every time I copy from Sales Order to Invoice (without adding).  Then my report works OK using object ID 112. But if I cancel, the ODRF/DRF1 entries don't get erased and my report (and ODRF/DRF1) have duplicate entries when I do it again. That's one bug.  Most of the time nothing shows up in ODRF when I do the same, and when I create a blank report with 2 parameters (DocKey@ and ObjectId@) and the following command "select {?DocKey@} as DocKey, {?ObjectId@} as ObjId" I get the error "Object reference not set to an instance of an object".  My report does nothing but display DocKey.  I'm not even referencing the ODRF table in my report, just the 2 parameters.  I'm very confused.  8.81 PL 06

Answers (0)