Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Unanswered

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"

Posted on by 240

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;


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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans