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)

Show tmpData in Form Grid

(0) ShareShare
ReportReport
Posted on by

Hi all

I do have a form with a grid connected to a datasource. Now I expand the grid with fields, pointing to data on a tmpTable. These fields are hidden until I mark a checkbox on the form. With this mark I set the fieldsvisible, calculate the relating tmpData and set it.

The tmpTable on the Form has property "JoinSource" and LinkType outerJoin set.

Now my data is not visible.

Can someone help me out?

*This post is locked for comments

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    we need to do what error message is saying, to reach at exact issue.

    it is asking to enable remote errors of SSRS, do that and get the real issue, so someone may be able to help you

  • Community Member Profile Picture
    on at

    I am sorry but what is the relation between no Data on a form and SSRS?

  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    How do you populate data to the tmp table? Also if you have populated data to the table, you'll want to bind the data to the datasource, for example using the LinkPhysicalTableInstance method.

    More information here: www.axaptapedia.com/Temporary_tables

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    I am sorry to say, that I was typing this message for another thread.

    kindly accept my apologies.

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Do an ExecuteQuery, or depending on the case you want a Research(true) on the main data source in the form AFTER you populate your temp table with data.

  • Community Member Profile Picture
    on at

    Dear Sohaib...for sure I will.

  • Community Member Profile Picture
    on at

    I do the link on the FormDS with join source and relation on the TmpTable. LinkPhysicalTableInstance returns an error "Cannot execute the required database operation.
    The method is only applicable to TempDB table variables that are not linked to existing physical table instance"

    This is how I fill my tmpDS:

    public void populateTmpLedgerBaseNWD()
    {
        LedgerTransModule           ledgerTransModule = new ledgerTransModule();
        GeneralJournalAccountEntry  accountEntry = GeneralJournalAccountEntry_ds.getFirst() as GeneralJournalAccountEntry;
        GeneralJournalEntry         journalEntry = GeneralJournalEntry_ds.getFirst() as GeneralJournalEntry;
    
        TmpLedgerBase       ledgerBase;
        TmpLedgerBaseNWD    ledgerBaseNWD;
    
        int                 i = 1;
    
        ledgerBaseNWD.clear();
        while(accountEntry)
        {
            ledgerTransModule.createTransModule(accountEntry.GeneralJournalEntry, false);
            ledgerBase.setTmpData(LedgerTransModule.transModule());
    
            while select ledgerBase
            {
                ledgerBaseNWD.GeneralJournalAccountEntryRefRecId    = accountEntry.RecId;
                ledgerBaseNWD.GeneralJournalEntryRefRecId           = accountEntry.GeneralJournalEntry;
    
                switch (i)
                {
                    case 1:
                        ledgerBaseNWD.Module1   = ledgerBase.Module;
                        ledgerBaseNWD.id1       = ledgerBase.id;
                        break;
    
                    case 2:
                        ledgerBaseNWD.Module2   = ledgerBase.Module;
                        ledgerBaseNWD.id2       = ledgerBase.id;
                        break;
                    case 3:
                        ledgerBaseNWD.Module3   = ledgerBase.Module;
                        ledgerBaseNWD.id3       = ledgerBase.id;
                        break;
                    case 4:
                        ledgerBaseNWD.Module4   = ledgerBase.Module;
                        ledgerBaseNWD.id4       = ledgerBase.id;
                        break;
                    case 5:
                        ledgerBaseNWD.Module5   = ledgerBase.Module;
                        ledgerBaseNWD.id5       = ledgerBase.id;
                        break;
                }
                i++;
            }
            ledgerBaseNWD.insert();
    
            accountEntry = GeneralJournalAccountEntry_ds.getNext() as GeneralJournalAccountEntry;
        }
    
        TmpLedgerBaseNWD.setTmpData(ledgerBaseNWD);
        GeneralJournalAccountEntry_ds.research();
    }


  • Martin Dráb Profile Picture
    241,515 Most Valuable Professional on at

    First of all, please make clear what type of temporary table you're using. Is it InMemory or TempDB?

  • Community Member Profile Picture
    on at

    TempDB

  • b_radlyjames Profile Picture
    3,157 on at

    From what I can see, it looks like you are trying to fill a temp table based on 2 data sources that should have already retrieved their data.

    I am attempting something similar and it doesn't appear to work.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans