Posts

How to Change the Number into a Barcode for the Reports in Visual Studio

Image
Its Simple. Select the Column that you want to convert in to a Barcode and change the properties in the properties window. Save and Deploy!

Automatic Posting of Journals after importing through DMF

Image
Here is the code that will post the journals that are imported using DMF (in my case). Select the class DMFEntityBase and write the code below in the PostTargetProcess method Code to be written in the PostTargetProcess method /// /// Executes the logic once after processing the target data. /// /// /// A table buffer. /// public void postTargetProcess(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution) {     //     PriceDiscAdmTable               priceDiscTable;     PriceDiscAdmCheckPost           priceDiscAdmCheckPost;     PriceDiscAdmName                priceDiscAdmName;     PriceDiscJournalNum             PriceDiscJournalNum;   /*  while select priceDiscAdmName     {         select reverse firstOnly priceDiscTable      ...

Deploying reports in AX through AOT

Image
I recently found that there is another method to deploy a report from VS (in AX – through AOT) After we make the changes, in the report in Visual Studio, 1.       Save the Changes (Click Save) 2.        Rebuild the project and add the project to AOT. 3.        Go to AOT > SSRS Reports and find the report. 4.        Restore the Report and deploy element. 5.        The report deploys into AX and ready for use.

Unable to begin a distributed transaction

Image
Hey All, I am trying to get a list of error messages on a server using the sp_readlogerror stored procedure. I have a central server A and I am trying to get the information from Server B. exec [server B].model.sys.sp_readerrorlog the above statement works well and gets the data, But it throws up a transaction error when i try to insert into a temp table on server A. Here is the code running on server A: create table #ErrorLog(LogDate datetime, ProcessorInfo varchar(1000),Text varchar(5000)) insert into #errorLog exec [Server B].model.sys.sp_readerrorlog this Throws up a transaction error as below OLE DB provider "SQLNCLI" for linked server "BHSF-BTR-W318" returned message "The partner transaction manager has disabled its support for remote/network transactions.". Msg 7391, Level 16, State 2, Line 3 The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "BHSF-BTR-W318" was ...

Interesting article - A Merge bug

Hey Guys, I have come across a very interesting article by one of the members (Paul White)  of the SQLServerCentral group. Here is the Link to that:   http://sqlblog.com/blogs/paul_white/archive/2010/08/04/another-interesting-merge-bug.aspx have Fun....

Script to find unused tables on a server

/*This Script is used to list all the Unused tables on a Server. The script does not work for the sql 2000 Server*/ declare @sql varchar(2000), @DatabaseName varchar(100) /* LOOP THROUGH THE SERVERS*/ If Object_ID('tempdb..#unusedTables') is not null drop table #unusedTables create table #unusedTables(DatabaseName varchar(100), Object_Id int, TableName varchar(100))    /*CURSES THROUGH ALL THE DATABASES ON THE SERVER  */     declare Database_list cursor for         select     name from     sys.databases where     name not in ('master','msdb','modeL','tempdb')     open Database_list fetch next from Database_list into @DatabaseName while @@fetch_status = 0 begin      /* THIS PART GETS THE LIST OF TABLES IN A PARTICULAR DATABASE*/         set @sql =    'select   ...

Useful Code for Timesheet Reminder

USE [MTSC] GO /****** Object:  StoredProcedure [dbo].[TimesheetHoursDailyReminder]    Script Date: 11/03/2010 13:28:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER Procedure [dbo].[TimesheetHoursDailyReminder] AS /******************************************************************************** Stored Procedure Name:    [dbo].[TimesheetHoursDailyReminder] Date Written:             10/06/09            Author:                    Chitanya Chitturi Project/System:            MTSC                Purpose/Description:    Time Sheet Reminder Input Parameters:        Tables:       ...