Skip to main content
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

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
EH-09052238-0 Profile Picture

EH-09052238-0 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 1

Featured topics

Product updates

Dynamics 365 release plans