web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Error when publishing AX Reports

(0) ShareShare
ReportReport
Posted on by

When running Publish-AXReport we see the below error:

Publish-AXReport : Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 46, position 8.

At line:1 char:17

+ Publish-AXReport <<<<  -ReportName "*" -RestartReportServer

+ CategoryInfo          : ParserError: (:) [Publish-AXReport], XmlException

+ FullyQualifiedErrorId : Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 46, position 8.,Microsoft.Dynamics.AX.Framework.Management.Reports.PublishReportCommand

The error only occurs on those reports which have a related assembly.  The same error (only with Publish-AXAssembly instead of (only with Publish-AXReport) can be produced with this more targeted statement:

Publish-AXAssembly -id 'SSRSNLBAOS2' -vsprojectname 'assetAcquisitionDocumentPL.BusinessLogic' -verbose

(also logged here: http://serverfault.com/questions/740406/publish-axreport-gives-error-name-cannot-begin-with-the-character)

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,788 on at

    Have you considered that maybe there's a leading space in something other than the report name?  Perhaps in the server name, instance name, or one of the URLs in the SSRS Report Servers configuration, or maybe in the AOS Server Configuration manager, registry, or report server .ini file?

  • Community Member Profile Picture
    on at

    Good shout - I thought about that and checked all the settings I could think of; sadly didn't note down where I'd looked; I'll recheck soon and will enumerate what I've looked at here so people can say if I've missed something.

    FYI: I also found a very similar issues here:

    - forum.stimulsoft.com/viewtopic.php;t=3661

    - community.dynamics.com/.../168434

    Both of which suggest there's likely a value in an XML file somewhere which is causing this issue (i.e. as the error looks very similar to those XML parser errors)... though whether it's a configuration file or something system generated I can't guess.

  • Verified answer
    Brandon Wiese Profile Picture
    17,788 on at

    I tried to pad leading spaces into everything I could think of to see if I could replicate your issue, but I was not able to.

    I would probably start with Process monitor at Sysinternals.com.  Start it right before your publish-axreport and stop it immediately after the error.  You will still have a mountain of events to sort through, but if you start from the point of error and go backwards, you might be able to find where the leading space is at and/or where it is pulling it from.  It's a long shot, but it has worked in the past where nothing else did.

  • Verified answer
    Community Member Profile Picture
    on at

    Great shout; thank-you.

    Running this showed that there were lots of tasks related to `D:\Program Files\Microsoft SQL Server\MSRS11.AX2012_ENVIRON1\Reporting Services\ReportServer\rssrvpolicy.config`.

    Converting the content to XML in PowerShell gave the same error.  ([xml][string](get-content 'd:\...\rssrvpolicy.config').

    Looking through the file I found a CodeGroup element formatted as: `< CodeGroup class="UnionCodeGroup" ...` (i.e. with a space in the opening tag before the element name).

    Correcting the XML and rerunning the Publish command worked successfully!

    You've made my weekend!  Thank-you.

  • Brandon Wiese Profile Picture
    17,788 on at

    Wow, that's excellent!  Glad I could help.

  • giggsmeat Profile Picture
    10 on at

    online chicken delhi

    www.giggsmeat.com/.../

    online chicken near me

    www.giggsmeat.com/.../

    <a href="www.giggsmeat.com/.../">online chicken delhi</A>

    <a href="www.giggsmeat.com/.../">online chicken near me</A>

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans