cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report parameters

Former Member
0 Kudos

Hello all,

  i have a crystals report that takes four parameters,how do i pass them to my report when i clicked Print Preview bcos it prompt me to enter the report parameters values.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Annie,

Change the Parameter name in crystal report to DocKey@.

You can jsut  right click the parameter name in the crystal report and rename.

Do not need to change the name in SP.

Regards

Edy

Former Member
0 Kudos

hi Edy,

It worked for me and thanks for the help

Answers (1)

Answers (1)

Former Member
0 Kudos

hi.

Plz have a look on below posts.

http://scn.sap.com/thread/3493453

Former Member
0 Kudos

hello riniva,

have looked that the two links you sent and does not address my issue.i uploaded my crystal report to SBO as layout using DIAPI.The records save to those two tables(RTYP,RDOC) and no entry goes the OCMN Table.

Private Sub SBO_Application_LayoutKeyEvent(ByRef eventInfo As LayoutKeyInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.LayoutKeyEvent.

how do i pass the values to the parameters under above event.

edy_simon
Active Contributor
0 Kudos

Hi Annie,

Using the Layout Key event, you can only pass one parameter.

Your work around will be to only use 1 parameter.

Concatenate all the values into single string and pass this parameter into your CR.

In your CR, Parse back this Concatenated string into 4 formula.

Regards
Edy

Former Member
0 Kudos

Hello Edy,

thanks for your response.am doing exactly what you have describe in your response but still it prompt me to enter the parameter value.i created the crystal report with a stored procedure which takes one parameter.below is the code for handling the action.

  Private Sub SBO_Application_LayoutKeyEvent(ByRef eventInfo As LayoutKeyInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.LayoutKeyEvent

        If eventInfo.BeforeAction = True And eventInfo.ReportCode = "A005" Then

            Try

                Dim finalPara as string = strTypeSelected & strDateFromSelected & strDateToSelected & strGroupBy

                eventInfo.LayoutKey = finalPara

            Catch ex As Exception

                SBO_Application.MessageBox(ex.Message, 1, "Ok")

            End Try

        End If

    End Sub

Regards

edy_simon
Active Contributor
0 Kudos

Hi Annie,

Can I see a screen shot on your CR parameters?

Several things to note.

1. The CR must only have 1 parameter. Named DocKey@

2. Set it to type String

3. If you are using SP then the SP need to have only the above parameters and parse the string in your SP.

Regards

Edy

Former Member
0 Kudos

Hi Edy,

i have screenshot the parameter at crystal report,stored procedure, and inside SAP B1 application.

Thanks

Former Member
0 Kudos

Hello Edy,

this image show how my parameter look like inside crystal report.