Categories
Dynamics NAV HOW TO Microsoft VB.NET Visual Studio

HOW TO calculate the weekday name in RDLC

To calculate the weekday name in RDLC you can use a combination of two Visual Basic functions:

  1. DatePart
    Syntax

    DatePart(interval,date[,firstdayofweek[,firstweekofyear]])
    

    firstdayofweek is an Optional parameter and the Default value is 1 (Sunday).
    firstweekofyear is an Optional parameter and the Default value is 1 (January).

  2. WeekdayName
    Syntax

    WeekdayName(weekday[,abbreviate[,firstdayofweek]])
    

    abbreviate is an Optional parameter. A Boolean value that indicates if the weekday name is to be abbreviated.
    firstdayofweek is an Optional parameter and the Default value is 1 (Sunday).

  3. HOW TO calculate the weekday name in RDLC

    CORRECT RESULTS
    [sourcecode language=”VB”]
    =WeekDayName(DatePart("w", Fields!CurrentDate_System.value,0))
    =WeekDayName(DatePart("w", Fields!CurrentDate_System.value,0,0))
    [/sourcecode]

    WRONG RESULTS
    [sourcecode language=”VB”]
    =WeekdayName(DatePart("w", Fields!CurrentDate_System.Value))
    =WeekdayName(DatePart("w", Fields!CurrentDate_System.Value),false,0)
    [/sourcecode]

    Did my HOW TO help you? Leave a reply.

Categories
Dynamics NAV Microsoft

Cannot build the page {PageNo}. The metadata object Table {TableNo} was not found.

When you try to run an imported page in Nav 2013 you receive the following error:

Microsoft Dynamics NAV
—————————

Cannot build the page {PageNo}.
The metadata object Table {TableNo} was not found.
—————————
OK
—————————

The metadata object Table {TableNo} was not found.

Cause 1:
The table {TableNo} is not compiled.

Solution 1:
Compile the table {TableNo}.

Cause 2:
TableRelation property of any field is having {TableNo}.

Solution 2:
In the Development Environment design the SourceTable of the page {PageNo}.
Check all fields table relations that have the {TableNo} as TableRelation and fix them up writing the correct table.

Did my solution solve your problem? Leave a reply.