Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

The ) is missing - error when using custom button with the Launch command to call ROI in Dynamics 2011.

Posted on by Microsoft Employee

I get an error message in a Crystal Report Windows Forms Viewer window saying... The ) is missing... when using a custom button with the Launch command to call ROI in Dynamics 2011. I have gone to the "books" and followed the examples given but have no success. This command used to work in Dynamics SL 7 before upgrading to Dynamics 2011. Can someone give me a tip on what is wrong?

Below is the code behind my custom button...

 

Sub cmdReport_Click()

    Dim CustId As String * 10

    Dim ParmStr$

 

    CustId = GetObjectValue("ccustid")

    ParmStr = "ROI.EXE " + PRMSEP + "08652/RUN" + PRMSEP + "08652/FORMAT" + PRMSEP + "ARTran.Custid = " + SParm(CustId) + "/WHERE" + PRMSEP + "/PSCRN"

    serr2 = Launch(ParmStr, True, True, 0)

    'Call ApplSetParmValue(PRMSECTION_VBRDT, "", "08652/RUN")

    'Call ApplSetParmValue(PRMSECTION_VBRDT, "", "08652/FORMAT")

    'Call ApplSetParmValue(PRMSECTION_VBRDT, "", "ARTran.Custid = " + SParm(CustId) + "/WHERE")

    'Call ApplSetParmValue(PRMSECTION_VBRDT, "", "/PSCRN")

    'serr2 = Launch("ROI.EXE ", True, True, 0)

 

End Sub

 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: The ) is missing - error when using custom button with the Launch command to call ROI in Dynamics 2011.

    Thank you very much, Barry!! Your answer worked for us!

    Just in case someone needs to see the working code, I pasted the two examples below...

     


     

     

     

    Sub cmdReport_Click()

        Dim CustId As String * 10

        Dim ParmStr$

     

        CustId = GetObjectValue("ccustid")

        'ParmStr = "ROI.EXE " + PRMSEP + "08652/RUN" + PRMSEP + "08652/FORMAT" + PRMSEP + "{ARTran.Custid} = " + SParm(CustId) + "/WHERE" + PRMSEP + "/PSCRN"

        'serr2 = Launch(ParmStr, True, True, 0)

        Call ApplSetParmValue(PRMSECTION_VBRDT, "", "08652/RUN")

        Call ApplSetParmValue(PRMSECTION_VBRDT, "", "08652/FORMAT")

        Call ApplSetParmValue(PRMSECTION_VBRDT, "", "{ARTran.Custid} = " + SParm(CustId) + "/WHERE")

        Call ApplSetParmValue(PRMSECTION_VBRDT, "", "/PSCRN")

        serr2 = Launch("ROI.EXE ", True, True, 0)

     

    End Sub

     

  • Verified answer
    Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: The ) is missing - error when using custom button with the Launch command to call ROI in Dynamics 2011.

    In SL2011, it is necessaey to enclose the TableName.ColumnName in curly braces

    Barry

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: The ) is missing - error when using custom button with the Launch command to call ROI in Dynamics 2011.

    Test

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans