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 NAV (Archived)

Create Business Charts It Gives the error Like "A DotNet Variable has not been instantiated. Attempting to call System.Data.DataTable.Columns in Table Business Chart Buffer: IsXAxisDateTime"

(0) ShareShare
ReportReport
Posted on by 256

To Create The Business Chart I Referred the Link "suvidhablogpost.wordpress.com/.../dynamics-nav-2013-drill-down-on-business-charts" But It Gives the Dotnet Error in below image

Dotnet.png

Can You Please Help Out that issue. Thanks in Advance

This is My Code Unit Code

===============

Documentation()

OnRun()

GenerateDataInventorybyLoc(VAR BusinessChartBuff : Record "Business Chart Buffer";ItemNum : Code[10])
WITH BusinessChartBuff DO BEGIN
  Initialize;

  AddMeasure('Inventory',1,"Data Type"::Decimal,"Chart Type"::Column);
  SetXAxis('Location',"Data Type"::String);
  Query1.SETRANGE(Query1.Item_No,ItemNum);
  
  ItemNo:=ItemNum;//
  i:=0;
  J:=0;//
  Query1.OPEN;
  WHILE Query1.READ DO BEGIN
    i += 1;
    J+=1;
    BusinessChartBuff.AddColumn(Query1.Location_Code);
    SetValue('Inventory',i-1,Query1.Sum_Remaining_Quantity);
  LocCode[J]:=Query1.Location_Code;//
END;
Query1.CLOSE;
END;

OnDataPointClicked(VAR BusChartBuff : Record "Business Chart Buffer")
DrilldownLocInv(LocCode[BusChartBuff."Drill-Down Measure Index"+1]);

DrilldownLocInv(LocCode : Code[10])
ILE.SETRANGE("Item No.",ILE."Item No.");
ILE.SETRANGE("Location Code",ILE."Location Code");
PAGE.RUN(PAGE::"Item Ledger Entries",ILE);


==================

This is My Chart Page Code

LOCAL UpdateChart()
ItemQtyLocationWise.GenerateDataInventorybyLoc(BusinChartBuff,"No.");
BusinChartBuff.Update(CurrPage.Chart);

Chart::DataPointClicked(point : DotNet "Microsoft.Dynamics.Nav.Client.BusinessChart.BusinessChartDataPoint")
BusinessChartBuffer.SetDrillDownIndexes(point);
ItemQtyLocationWise.OnDataPointClicked(BusinessChartBuffer);

Chart::DataPointDoubleClicked(point : DotNet "Microsoft.Dynamics.Nav.Client.BusinessChart.BusinessChartDataPoint")

Chart::AddInReady()
UpdateChart;


*This post is locked for comments

I have the same question (0)

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans