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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

An exception occurred in the query metadata execution. The exception is Map object not initialized.

(0) ShareShare
ReportReport
Posted on by 321

8420.Error.jpg

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at

    I don't see any text explaining what you're doing when you got this error. Can you add it, please?

    Also, next time, please select only categories related to your thread, not every single category. For now, I've removed everything except of Development / Customization / SDK and Reporting and BI.

  • Abdelrhman Hiba Profile Picture
    321 on at

    Dear, Martin

    Firstly want thank you a lot for respond

    And am sorry for intrubtion

    Explain the problem :

    Whene i want to preview report in vs after design and connect with data source and select fields of report

    .

  • Suggested answer
    Khurshid Wali Profile Picture
    928 on at

    Hi Abdelrhman,

    Your Question is still not clear.

    Normally this problem arise when you forgot to set SRSReportQueryAttribute(queryStr(_____)), attribute in your DP class.

    Try to Run the report and Share Info log error message.

  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at

    What kind of datasource have you used? A query or an RDP class? What can you tell us about it?

    Have you tried to debug or review the class throwing the exception?

  • Abdelrhman Hiba Profile Picture
    321 on at

    thank for hint 

    the problem is solved 

  • Khurshid Wali Profile Picture
    928 on at

    How did you solve this problem? Please share with community. 

  • Verified answer
    Abdelrhman Hiba Profile Picture
    321 on at

    the main problem from scratch

    I wanted to build a Report Based on RED Class

    when preview data in VS (SSRS Report) There was a specific field whose value does not come and this error message appears

    But after asking the question her and the hints that you have referred to my

    Traced the source of the error and was of that type EDT of that filed its different from another EDT for Actual Field in the original table

    that all (Different in EDT of filed in the TempTable) :D

    That's exactly what happened
    I hope that the answer will be satisfactory to everyone

    Regards 

    Abdelrhamn Hiba

  • Suggested answer
    Logger Profile Picture
    60 on at

    It's a bug.

    The tempDBTableNamesMap variable was not initialised in \Classes\SrsReportProviderQueryBuilder\initializePreProcessedDetails   for preview mode.

    I fixed this issue for Dax 2012 R3 CU13

    You need to customize

    \Classes\SrsReportProviderQueryBuilder\initializePreProcessedDetails

    private void initializePreProcessedDetails()
    {
    #SRSFramework
    RecId preProcessedRecId;
    str preProcessedRecIdStr;
    Container tempDBTableNames;
    int idx, size;

    // if pre-processed report, get the table record here
    if(reportProviderMetadata.isPreProcessingRegular() || reportProviderMetadata.isPreProcessingTempDB())
    {
    // If running in preview mode, get the details table without the RecId
    // Find by name for the RDP name, inPreviewMode, this will provide the record from the previous run to ensure we clean it up.
    if(isPreviewMode)
    {
    // this can be empty if no record exists for previous run of previewMode.
    preProcessedDetails = SrsReportPreProcessedDetails::findByName(reportProviderName, true);

    // JEV005559, PKoz 27.11.2020 -->
    /*
    (S)\Classes\SrsReportProviderQueryBuilder\addTempDBCursorToQueryRun - line 18
    (S)\Classes\SrsReportProviderQueryBuilder\getQueryRun - line 28
    (S)\Jobs\
    . SrsRevenueReport_MRC.ChartDesign [Preview] 0 0

    */

    if (!tempDBTableNamesMap)
    {
    tempDBTableNames = preProcessedDetails.TempDBNames;
    size = conLen(tempDBTableNames);

    // if preprocessing is of TempDB type, and container size less than 2, then something went wrong..error out
    if(reportProviderMetadata.isPreProcessingTempDB())
    {
    if(size < 2)
    {
    throw error(strFmt("@SYS4007195", preProcessedRecIdStr));
    }
    else
    {
    tempDBTableNamesMap = new Map(Types::String, Types::String);
    for(idx = 1; idx <= size ; idx+=2)
    {
    // AOT TempDBName, SQL tempDB name
    tempDBTableNamesMap.insert(conPeek(tempDBTableNames, idx), conPeek(tempDBTableNames, idx+1));
    }
    }
    }
    }
    // JEV005559, PKoz 27.11.2020 <--
    }
    else
    {
    // get the pre-processed details table record.
    if(reportProviderParameters.exists(#RdpPreProcessedIdParameter))
    {
    preProcessedRecIdStr = reportProviderParameters.lookup(#RdpPreProcessedIdParameter);
    preProcessedRecId = str2int64(preProcessedRecIdStr);
    preProcessedDetails = SrsReportPreProcessedDetails::findByRecId(preProcessedRecId, reportProviderName);

    tempDBTableNames = preProcessedDetails.TempDBNames;
    size = conLen(tempDBTableNames);

    // if preprocessing is of TempDB type, and container size less than 2, then something went wrong..error out
    if(reportProviderMetadata.isPreProcessingTempDB())
    {
    if(size < 2)
    {
    throw error(strFmt("@SYS4007195", preProcessedRecIdStr));
    }
    else
    {
    tempDBTableNamesMap = new Map(Types::String, Types::String);
    for(idx = 1; idx <= size ; idx+=2)
    {
    // AOT TempDBName, SQL tempDB name
    tempDBTableNamesMap.insert(conPeek(tempDBTableNames, idx), conPeek(tempDBTableNames, idx+1));
    }
    }
    }
    }
    else
    {
    throw error("@SYS334989");
    }
    }
    }
    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans