Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Suggested answer

SQL Error trying to run an SSRS report

Posted on by 30

Good morning,

Trying to convert a Crystal report to SSRS and I am trying to add a sales person ID parameter and getting the following error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '+'.

This is my query:

"SALES ID: " + {?SalespersonID} + "        " + (if {?SalespersonID} ="All" then " " else {Command.SLPRSNFN} + " " + {Command.SPRSNSLN})

This is the query that I took from the Crystal report. Forgive me if this is a dumb question but I am fairly new to writing intricate reports in SSRS.

Thanks,

Victor

Categories:
  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: SQL Error trying to run an SSRS report

    Jonathan is absolutely correct. You will need to extract all queries out of Crystal Report and get them to run using SSMS. Hopefully you have someone there who can help you with that conversion.

  • Suggested answer
    HACKDBA Profile Picture
    HACKDBA 165 on at
    RE: SQL Error trying to run an SSRS report

    Victor,

    The reason for your error is that it's not actually a SQL query. SSRS objects utilize T-SQL to retrieve data from the Dynamics GP database. If you are not familiar with T-SQL there are tons of resources on YouTube and Google to help get you going in the right direction. If you have access to a Pluralsight account there are tons of amazing courses on learning T-SQL in general.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans