Quantcast
Channel: Microsoft Dynamics GP Forum - Recent Threads
Viewing all articles
Browse latest Browse all 32807

Report isn't displaying data

$
0
0

In GP2010, I created a temp table, a report, and a procedure wherein I pass the temp table and run a report on that table. The procedure is going to be invoked from a plugin to run the report. I've used dag.exe to generate a dll so I can access the table and the procedure from the plugin code. I'm able to put rows into this temp table and iterate through the rows and have them show up using MessageBox.Show() in the plugin. When I pass the table from the plugin into the dexterity procedure I'm able to retrieve that data and display them in warning messages in dex code. But when I run a report on this table it doesn't show anything. It's like the data doesn't exist.

What am I missing here? Is there something weird happening when passing the table from the plugin in C# code to a Procedure in dex code to I don't know about?

Here is my sample code

 private void RunBatchReport(string legend1, string legend2)
{
    TableError error;
    var batchReportsTable = MyDexterity.Tables.BatchReport;
    var batchReports = service.GetBatchReports(Dynamics.Globals.UserId.Value, 
                       Dynamics.Globals.CompanyId.Value.ToString(), legend2);
    batchReportsTable.Clear();
    foreach (var report in batchReports)
    {
        batchReportsTable.Id.Value = report.Id.ToString();
        batchReportsTable.ReferenceNum.Value = report.ReferenceNumber ?? "";
        batchReportsTable.Name.Value = report.Name ?? "";
        batchReportsTable.MasterNumber.Value = report.MasterNumber;
                
        error = batchReportsTable.Save();
        if (error != TableError.NoError)
            MessageBox.Show("error saving report - " + error.ToString());
    }
    MyDexterity.Procedures.RunBatchReport.Invoke(legend1, legend2, batchReportsTable);
    batchReportsTable.Close();
}

**** Run_Batch_Report **** Dex code
in string legend1, legend2;
inout table Batch_Report;
run report 'Batch_Report' legends legend1, legend2;

Viewing all articles
Browse latest Browse all 32807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>