cancel
Showing results for 
Search instead for 
Did you mean: 

Switch from OINV to ODRF in Crystal Report layout for print the Invoice?

Former Member
0 Kudos

Hi,

I have imported in Sap Business One some standard report developed by Sap with Crystal Report (like Sales Invoice).

I have try to print my Invoices and all is OK, then I have try to print a Draft Invoice and, even in this case, is all ok. Then I have open the Crystal Report designer for this print module, and the entry point is the OINV table. How can he print succesful the Draft Invoice (that is in the ODRF table ObjType = 13)? Formula Field? I don't understand!!

Thank for the help!!

Marco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marco,

System report is much more complicated than normal standard report. It has all built-in relationships defined.

Thanks,

Gordon

Former Member
0 Kudos

So If I want to enabled the layout for the Invoice Draft, I have to create another layout?

Former Member
0 Kudos

You can edit the system report and save as your report.

Former Member
0 Kudos

If I have a Sap layout in Crystal Report I can do this, but If I want to develop a new layout (that is not present in the Sap standard layout) I'm not able to switch automatically from Invoice (OINV) and Draft (ODRF). I have to develop two different layout type?

Former Member
0 Kudos

All your editing will not be in SAP report. What is your question?

Former Member
0 Kudos

My question is: how can I develop a new Crystal Report Layout for a Invoice Document, and using this layout even for Draft Document Invoice.

Former Member
0 Kudos

As I said, you have to edit the system report no matter how different they look like.

Former Member
0 Kudos

Hi Marco,

You only need a single Crystal report for this. Base it on a stored procedure which has two INT type parameters @DocKey and @ObjectId. Within your SQL create IF blocks to handle different @ObjectId values:

IF @ObjectId = 13 then use the invoices tables OINV/INV1 etc.

IF @ObjectId = 112 then use the draft tables ODRF/DRF1 etc.

Don't forget to put the @ symbol at the end of the parameter in the report itself. That is all that is needed to create a single report that works for both added invoices and draft invoices. You could extend the SQL to handle other @ObjectId values like 14 for AR Credit Notes and so on.

Regards,

Andrew.

Former Member
0 Kudos

Thanks Andrew

john_obrien7
Participant
0 Kudos

Hi Andrew,

I'm using this approach but am finding that when I do a print preview on an AR Invoice before adding the doc, its not creating a record in ODRF tables.  For sales orders however it is inserting a record in ODRF when I print preview before adding.

Is there some setting that needs to be enabled for this to happen?

Thanks,

John

Former Member
0 Kudos

hola jhon, tengo tu misma situación con la factura. como lograste solucionar?? necesito el mensaje de borrador para cuando la factura se ve en vista preliminar

Answers (0)