cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically pass parameters to Crystal Report Viewer

Former Member
0 Kudos

Hi,

I am quite new to Crystal Reports and SAP. I've tried searching for an answer to my question but it seems that answer is so obvious that I am not able to find it directly.

I have created a Crystal Report and I am passing two parameter to the report. The parameters are DocEntry and ObjectType.While running the report from Crystal Report for Visual Studio 2008, it is aking me to enter the two parameter(as expected) while running it.

I have imported this report in SAP and set it as default to Sales Quotation. Now, when I try to run the report it is again asking for the parameters. Ideally, what I want is that the DocEntry and ObjectType should be taken from the OQUT table automatically rather then me passing it manually.

Hope you will be able to help me with this !!

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ninad,

You should create just one parameter named "DocKey@" (type Integer). DocKey@ parameter is equal to OQUT.DocEntry, and it's the valid parameter used by SAP for layouts. The value for ObjectType is implicit when you run layout from Quotation form, and it is not necessary add it in Crystal Reports design.

Best regards,

JC.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

To set default crystal report in sap then you need to define parameter as DocKey@ for docentry as number and i think ObjectId@ for ObjType as String, insilde the parameter list of command prompt.

eg., in query where OQUT.docentry docentry= {?DocKey@}

If ur not mention the parameter like above then it will ask to give parameter.

Hope it will resolve the problem facing

Thanks,

Shibin

Message was edited by: Shibin Thomas

Former Member
0 Kudos

Hi Shibin,

Many thanks for the reply !!

I have already created a paramter as DocKey@. Also in the "Selection Expert" I have assigned {OQUT.DocEntry} = {?DocKey@} but still it is asking me for the paramters.

In case this is not what you have suggested above, let me know the steps by which I can do what you have suggested(regrets for the inconveniency caused but I am quite new to this).

Best Regards,

Ninad

Former Member
0 Kudos

Any Help on this please...

abhilash_kumar
Active Contributor
0 Kudos

Hi Ninad,

Are you viewing the report in SAP B1?

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Yes.

abhilash_kumar
Active Contributor
0 Kudos

OK. I moved it to the right space.

-Abhilash

Former Member
0 Kudos

Thanks.

-Ninad Vaidya