Quantcast
Channel: Martin Dráb's Activities
Viewing all 17532 articles
Browse latest View live

Column Totals for Custom Field in SSRS Reports

$
0
0

I have problem face with custom column totals in SSRS Reports. i have one table with 5 fields, Total Amount is one of the field.so i want Summations of All Values(Grand Total). Total amount field is not in the Dataset,it is only appear in Report section. Please Help me...

Ex:-

Item     Quantity       Unit Price     Total Amount

A             10               100                1000.00

       B             20                 200               4000.00

      C             10                  50                    500.00

-----------------

Total:-5500.00

----------------


AX 2012 AIF Web services

$
0
0

I'm fairly new to the AIF web service side, but that seemed to have went as planned. I have consumed this the web service from AX on my windows service in VS 2013. Then I go to call a simple method in the windows service and it gives me the error: "No overload for Method 'addintegers' takes 2 arguements. What am I missing to call and return such a simple method from AX?

Method in AX:

[SysEntryPointAttribute(true)]
public int addIntegers(int _int1, int _int2)
{
    return _int1 + _int2;
}

VS2013 Service:

public void SendParts()
    {
        //ws.InventJournalTrans() = 
        PolyTransferService.PolyServiceReference.PolyJourInfoService polyJourInfoService;

        int test;

        polyJourInfoService = new PolyTransferService.PolyServiceReference.PolyJourInfoService();

        test = polyJourInfoService.addIntegers(1, 1);

    }


How can I open specific form and specific record from C#application

$
0
0
 Hi.
I develop at AX 2012 R3 + C#.
How can I open specific form and specific record from C# application.
I want to open specific form and specific record that was set parameters from C# application.
I wonder it might possible use .NET proxy.

 

I use this code in X++.(Classes\Batch1)

static void main(Args _args = null)
{
    MenuFunction menuFunction;
    CustTable _custTable;
    _args = new Args();

    _custTable = CustTable::find("DAT-000001");
    menuFunction = new MenuFunction(menuitemDisplayStr(CustTable), MenuItemType::Display);

    _args.record(_custTable);
    menuFunction.run();
}


And I use this code in C#.

using (Session session = new Session())
{
     session.Logon("DAT", null, null, null);
     Batch1 tmpBatch = new Batch1();
     Batch1.main();
 }

Try this code, it seems done successfully, but not open custform. Is it impossible?

I refer to this URL too: community.dynamics.com/.../152359

Specific Dimension on VendOpenTrans Grid

$
0
0

My task is to add a field in VendOpenTrans with a specific Dimension. I have added to my DataSources in VendOpenTrans tables DimensionAttributeValueSet, DimensionAttributeValueSetItem, DimensionAttributeValue and DimensionAttribute. In their properties I have made joins (join source) with InnerJoin LinkType (I tried all of the options here). Then I have add a field on my grid from DimensionAttributeValueSetItem -> DisplayValue (field name). And now in ExecuteQuery method of VendOpenTrans I add a code:

public void executeQuery()
{
    QueryBuildRange dimensionAttributeValueSetRange;
    ;

    dimensionAttributeValueSetRange = this.query().dataSourceTable(tableNum(DimensionAttribute)).addRange(fieldNum(DimensionAttribute, Name ));
    dimensionAttributeValueSetRange.value(queryRangeConcat(queryValue('KUP_NKUP_Zaliczka'), queryValue('')));

    super();


}

The final result of this is that I have a new filter with my dimension. So I don't see on my grid records that have an empty value in this dimension. The thing that I want to achieve is to show the value of "MyDimensionName" if It's filled but when It's not record should be shown with just an empty value... I spend on this many many hours and I still didn't work it out...

CIL vs MSIL

$
0
0

Hi,

When X++ codes are compiled, an intermediate code is generated.

I just want to know whether CIL and MSIL represents the same intermediate code or different.

Regards,

Riyaz

Code upgrade - Object not moved or override in AX 2012

$
0
0

Hi All,

It seems to me very strange issue; I moved all AOD files from AX 2009 to AX 2012 R3 folders as mentioned in Code Upgrade guide.

Let's say I added a class in AX 2009 with classId and system assigned it a Id 30076. In AX2012 MS added a class 'MCRDropShipPurchOrder' with same Id 30076. After moving AOD files it deleted this class 'MCRDropShipPurchOrder' from AX2012 and create my class (I created in AX2009) on this Id.

I did not expect to see this behavior rather I thought this upgrade process will manage it different way.

Another important thing is this I am facing this issue even with EDTs and Tables. For classes it is not a big deal I can export all classes from AX2009 and import them again into AX2012 after deleting them from there first. However, to change anything in Table and Field IDs will cost me a lot as I will have to write data upgrade scripts to map fields correctly.

What I have done so far with few tables; I deleted these tables from AX 2012 and added my custom fields manually which bring new Ids (different Ids in AX2009 for these fields). I cannot change field Ids for any field in a table by opening it in notepad as it will show me bad data after data upgrade.

Can anyone please guide me with the best approch to deal with this issue or is it a common problem (I think it should not be).

Computed Columns Dividing and Rounding

$
0
0

Hello,

Is it possible to control the rounding of the SysComputedColumn::Divide method for creating computed column in a view?  I've noticed in AX 2012 when using the divide method, the value seems to be the floor taken to the 6th decimal place.  For example, I created a simple table with two columns (Amount and Amount1) and a view which displays the value of both fields and a computed column that divides the two fields.  My data set looks like this:

amount ---------------- amount1  --------------- viewfield1

10.0000000000000000 30.0000000000000000 0.3333330000000000
10.0000000000000000 60.0000000000000000 0.1666660000000000
10.0000000000000000 70.0000000000000000 0.1428570000000000
10.0000000000000000 90.0000000000000000 0.1111110000000000
7.0000000000000000 11.0000000000000000 0.6363630000000000
7.0000000000000000 22.0000000000000000 0.3181810000000000
22.0000000000000000 7.0000000000000000 3.1428570000000000

The code in the computed column method is straight forward:

public static server str getDivision()

{

    return SysComputedColumn::divide(SysComputedColumn::returnField('myView', 'myDS', 'Amount'), SysComputedColumn::returnField('myView', 'myDS', 'Amount1'));

}

It seems that the SysComputedColumn::divide function divides the numbers and takes the floor after the 6th decimal.  Is there any way to control the rounding here?  I'd like to round the result at 10 decimal places instead of taking the floor at the 6th.

Unique revision across a ID

$
0
0

Hi,

My requirement is to achieve the table data's like this:

RecIdIDRevision
1AAA3 or A
2AAA2 or B
3AAA1 or C
4BBB2 or B
5CCC1 or A
6BBB1 or A

The table is the example, ID wont be unique but Revision have to be unique across the ID. In this scenario REVISION should be as string. 


Opening up AX Code from Infolog (AX 2012)

$
0
0

When I double-click on the text in the Infolog a pop-up window with X++ code appears in German. My language settings are en-au and AUS. What has caused this and can it be fixed?

save pdf to printarchive with extended information

$
0
0

Hi

I want to "print" a report into the print archive. in Addition I want to extend the archive to hold some information

Is this realizable?

[AX 2012 R3] Database deadlock during wave processing

$
0
0

Hi Guys,

we experienced strange database locks during wave processing (Task 3) recently. We are using R3 CU8.

The lock occurres very rarely (the second time this year) but if it happens it's repeatable. It happens when WHSWorkCreate (createTempLine Line 139-149) trys to insert a WHSTmpWorkLine. Here is a screenshot.

The first condition is the standard case. If i force the debugger into the second condition the insert is executed successfully, so i suspect the independant transaction has a high potential to cause a lock.

Down below is the SQL statement which is blocked. We currently trying to find out which SQL statement causes the block.

(@P1 int,@P2 nvarchar(20),@P3 nvarchar(21),@P4 nvarchar(21),@P5 numeric(32,16),@P6 nvarchar(21),@P7 numeric(32,16),@P8 nvarchar(11),@P9 int,@P10 nvarchar(21),@P11 int,@P12 nvarchar(21),@P13 nvarchar(21),@P14 nvarchar(21),@P15 int,@P16 bigint,@P17 numeric(32,16),@P18 nvarchar(11),@P19 nvarchar(26),@P20 int,@P21 nvarchar(11),@P22 nvarchar(11),@P23 nvarchar(11),@P24 nvarchar(11),@P25 nvarchar(21),@P26 nvarchar(21),@P27 int,@P28 bigint,@P29 nvarchar(21),@P30 nvarchar(21),@P31 nvarchar(21),@P32 numeric(32,16),@P33 nvarchar(21),@P34 numeric(32,16),@P35 nvarchar(21),@P36 nvarchar(11),@P37 int,@P38 nvarchar(20),@P39 nvarchar(21),@P40 nvarchar(26),@P41 numeric(32,16),@P42 nvarchar(61),@P43 nvarchar(21),@P44 int,@P45 nvarchar(26),@P46 numeric(32,16),@P47 nvarchar(21),@P48 nvarchar(21),@P49 nvarchar(21),@P50 nvarchar(21),@P51 nvarchar(26),@P52 nvarchar(21),@P53 int,@P54 nvarchar(20),@P55 int,@P56 nvarchar(21),@P57 int,@P58 nvarchar(11),@P59 nvarchar(11),@P60 nvarchar(5),@P61 int,@P62 bigint,@P63 bigint)INSERT INTO WHSTMPWORKLINE (WORKTYPE,WMSLOCATIONID,INVENTTRANSID,ITEMID,INVENTQTY,WORKTEMPLATECODE,DIRECTIVEQTY,DIRECTIVEUOM,ORIGINTYPE,ORIGINREFID,WORKTRANSTYPE,WORKCREATEID,INVENTDIMID,INVENTLOCATIONID,REFTABLEID,REFRECID,HIGHESTQTY,HIGHESTUNITID,LICENSEPLATEID,WORKCREATED,WAVEATTRIBUTECODE,WAVEATTRIBUTECODE2_,WAVEATTRIBUTECODE3_,WAVEATTRIBUTECODE4_,INVENTBATCHID,INVENTSERIALID,WORKBREAK,LOADLINEREFRECID,WAVEID,LOADID,SHIPMENTID,PACKINGQTY,ORDERNUM,LINENUM,WORKID,REQUESTEDTYPEID,PACKQTYCOMPARE,STARTLOCATIONID,ZONEID,CONTAINERID,INVENTUNITIZEQTY,TRANSTXT,RELEASETOWAREHOUSEID,CONTAINERLEVEL,HIGHESTCONTAINERID,AVAILPHYSICAL,CARRIERCODE,CARRIERSERVICECODE,CUSTVENDAC,FEFOBATCHID,LOCATEDLPID,MODECODE,REPLENDEMAND,REPLENLOCATIONID,SORTCODE,TOWAREHOUSE,PRODBOMOPRNUM,WHSFILTERNUM,ECORESSIZENAME,DATAAREAID,RECVERSION,PARTITION,RECID) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12,@P13,@P14,@P15,@P16,@P17,@P18,@P19,@P20,@P21,@P22,@P23,@P24,@P25,@P26,@P27,@P28,@P29,@P30,@P31,@P32,@P33,@P34,@P35,@P36,@P37,@P38,@P39,@P40,@P41,@P42,@P43,@P44,@P45,@P46,@P47,@P48,@P49,@P50,@P51,@P52,@P53,@P54,@P55,@P56,@P57,@P58,@P59,@P60,@P61,@P62,@P63)

Restarting the AOS didn't help. Deleting the WHSTmpWorkLine before processing a wave sometimes helped for a while but not reliable

Did anybody experienced this behavior?

Regards

Nils

Set default dimension for an item from category of a product

$
0
0

Hello community, 

I have a requirement where i should create financial dimension for an item based on the category of a product.

can you please tell me, if it is possible to do so?

i tried creating the dimension attribute value set like this:

dimensionAttrValSet                     = DimensionAttributeValueSet::find(EcoResProductCategory.Category);

but i wonder if doing this is logical ?

 

might you please helping me figuring this out?

 

Kind regards 

Jihane

Error Task Recorder

$
0
0

Hi!

I'm trying to use the task recorder, and I get the next error "the task recorder video worker is not present in the client bin".

Can u help me?

Microsoft Dynamics AX 2012 query

$
0
0

Dear Sir,

I ask about Microsoft Dynamics AX 2012 query, my task is to join two tables (Salesline and Inventsum) with sum (SalesQty and PostedQty). group by Salesline.Itemid

i try a dynamics query and job with x++ code the result is incorrect.

finally i want to design a report with sum of sold quantity and sum of on hand group by item id in sales line.

please advice

Thanks..

Image re-sizing in AX 2012 through Batch job

$
0
0

Hi All,

Can anyone please guide me how can I resize an image in AX 2012 using Batch functionality. I have thousands of images and want to resize them through batch.

I used System.Drawing.Image::FromFile(imagePath) method to get the image object but did not find other method to resize it.

NOTE: I have already tried with Image class but this class only works on client side and does not work on server side.


writing SQL statement based on Ax Query 2012

$
0
0

Hello Communtiy, 

i want to convert the following x++ statement  to sql:

static void UpdateCustTransDescription(Args _args)

{
    CustInvoiceLine     custInvoiceLine;
    CustInvoiceTable    custInvoiceTable;
    CustInvoiceJour     custinvoiceJour;
    CustTrans           custTrans;
    ttsBegin;
    while select forUpdate custTrans
        where !custTrans.Txt && custTrans.RecId == 5637355326
        join  custInvoiceJour
            where   custinvoiceJour.InvoiceId == custTrans.Invoice
               &&  custinvoiceJour.InvoiceAccount == custTrans.AccountNum
               &&  custinvoiceJour.InvoiceDate == custTrans.TransDate
               &&  custinvoiceJour.LedgerVoucher == custTrans.Voucher
                  join custInvoiceTable
                     where custInvoiceTable.InvoiceId == custinvoiceJour.InvoiceId
                         join    custInvoiceLine
                           where   custInvoiceLine.ParentRecId == custInvoiceTable.RecId
    {
        custTrans.Txt   =   custInvoiceLine.Description;
        custTrans.doUpdate();
       
    }
ttsCommit; }

 

Might you please advising me how i can achieve this? how i should proceed?
Is there any best practices that i should be aware of in order to improve the performance of this statement?

P.S:

I don't wanna use "generateOnly forceLiterals" as the generated query looks little bit too complicated to execute.

How to export data from AX2012 to .net DataTable

$
0
0

Hi All,

My requirement is to select some data from AX2012, then save those data to other database.

So I want to know how to select data into my .net program's DataTable? 

I have try to use the inbound ports to call a method on AX2012 to get the select result(The select result is a custom temporary table, when I call the method, it will fill the temporary table first.),

But the inbound ports does not return something like DataSet, I have on other ideas about this,

Any one can give me an  solution idea or reference for my requirement?

how to create Query in AOT as PIVOT in SQL AX 2012

MICROSOFTDYNAMICS_FUNCTIONAL_MODULE_4_COMPUTER_SCIENCE_ENGINEERS

$
0
0

HI GUYS I AM A COMPUTER SCIENCE ENGINEER LOOKING TO BUILD MY CAREER IN MICROSOFT DYNAMICS

BUT I WOULD LIKE TO KNOW THAT WHAT IS THE FUNCTIONAL MODULE FOR COMPUTER SCIENCE ENGINEERS

IN MICROSOFT DYNAMICS

Path Menu is missing

$
0
0

Hi all,

I just installed the AX 2012 R3 in the new server.

However after I open the transaction there are several menus which are missing from the path.

For example in the budgeting module below.

Where all set up menu and other transaction are missing compare with sandbox server in USMF.

My first guess is this one come from role authorization problem.

But I don't know where to start from.

Really appreciate if anyone could share how to solve this problem.

Thanks,

M.H.

Viewing all 17532 articles
Browse latest View live


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