Photography

Kamis, 26 Juli 2012

Microsoft Dynamics Navigate 2009 Tips Part 3

Hello Again,

This time i want to share how to make a simple Barcode in Report with Microsoft Dynamics Nav 2009.
this simple tutorial contributed by Dobson Software. This tutorial only for classic client, for further example to display barcode in RTC read the second part of this tutorial.

Before we start to create the barcode, first prepare some exquisites report to display a text / code in barcode.

1. Report in nav go to Sections and preserve some space for Barcode (*)
2. Install Font Code128BWin if you didnt find where to find it just download from this
    Code 128B Nav by Geert Rozendom
3. Extract the archive and find the *.ttf file or Code128BWin file, install it on Windows Control Panel
*. Length of barcode depends on input, it can be very long to small length.
Tutorial :

1.First just as i described in preparation, create report :


2. Open Global C/AL and Create Function for Barcode


3. Click Locals for the function, first create Variable for input the code / text to change into barcode


4. Set Return Value with Type text, and length 250

5. Set Variables to be used in function :



6. Now for the code, go to Code Unit for the function or Press F9 : and use this code :


MinValidASC := 32;
MaxValidASC := 156;
ValidASC := '?'; // Question Char
//start char alt+0154  stop char alt+0156
StartChar:='Å¡';    // Press ALT+0154
StopChar:='Å“';  //Press ALT+0156

Checksum := 104;
FOR i:=1 TO STRLEN(InCode) DO BEGIN

  TempCheck := COPYSTR(InCode,i,1);
  CharASC := TempCheck[1];
  IF ((CharASC < MinValidASC) OR (CharASC > MaxValidASC)) THEN
     BEGIN
       CharASC := ValidASC[1];
       InvalidCharFound := TRUE
     END;
  Checksum := Checksum +(i*(CharASC-32));
END;

ChecksumChar := (Checksum MOD 103);
IF (ChecksumChar < 95) THEN
    ChecksumChar := ChecksumChar + 32
ELSE
    ChecksumChar := ChecksumChar + 100;
InCode:=CONVERTSTR(InCode,' ','€'); // Press ALT+0128
//SpaceChar := ' ';
ReturnVal:=STRSUBSTNO('%1%2%3%4',StartChar,InCode,ChecksumChar,StopChar);

EXIT(ReturnVal);

 7. Now save and make sure the error message not occured

8. Go to Section again, and create a text box beside the field, just as i explained on preparation

9. Open Property of the text box, and go to font name, change it to Code128bWin
    (make sure that Code128Bwin.ttf already installed)
    change  the font size to more than 14 or more
    Change the Sourceexp  with FunctionName('Field Record')

10. Save and make sure the Barcode has appropriate Length to display it.
11.  Finish

In the code unit within comment with ALT+0156 or like it, press it simultaneusly. This Char cannot be copied because its dependen on system fonts and character.

Kamis, 19 Juli 2012

Just want to share . . .


Seekor anak kucing berusia tiga bulan mulai pulih di California setelah menempuh perjalanan melintasi Pasifik dengan selamat dalam kontainer pengiriman dari China, tanpa makanan atau air, kata para pejabat.


Binatang berbulu oranye-putih itu dinamai Ni Hao, atau dalam bahasa Mandarin bermakna Halo, setelah ditemukan ketika kontainer dibuka pekan lalu, setelah dua pekan perjalanan sejauh 10.450 kilometer dari Shanghai.

Awalnya ia terlalu lemah untuk berdiri, tapi anak kucing itu akhirnya memulai langkah pertamanya - dan pejabat kini sedang mencari pencinta kucing setempat yang mau mengadopsinya.

"Ni Hao disambut tim medis dengan suara mengeong pertamanya pagi ini dan berusaha untuk berdiri," kata Marcia Mayeda, kepala Los Angeles Department of Animal Care and Control.

Secara teori ia harus tetap di karantina selama 60 hari, tetapi ia "mungkin diperbolehkan untuk menyelesaikan masa karantina di bawah perawatan dan pengawasan dari keluarga asuh jika kesehatannya terus membaik," kata Mayeda.

Tidak jelas bagaimana cara anak kucing tersebut masuk ke dalam kontainer tersebut. (ia/ik)

Sumber : Yahoo News

Senin, 16 Juli 2012

Microsoft Dynamics Navigate 2009 Tips Part 2

How to store picture in Dynamics Nav 2009 alternate

Most of developer will using BLOB as format picture record in Nav's Database,
but i have diffrent opinion, instead using BLOB why not try to save a filename of
picture and save the picture elsewhere? Ive been try so hard to figure this problem
and finally i came up with these trivia solution, although i dont know this will suite
for other developers.

Okay first let me debrief the Application that i've created :
1. For example use table Item for displaying the picture, Open Object Designer and
    Click Design on Item Table. Insert field for storing a picture's name or location

   
2. Insert the new field with picture's name or location from your storage drive,  and
    Open Object Designer for Page in this example im using RTC as a client. Create
    new page with Table Item as source, make a simple List Plus Page such as this :
   
3. Define Variables for storing location / filename, InStream and OutStream variable,
    Also File variable to open Stream from location.
4.  Finally set code for generating Image in stream to be allocated temporary in Picture
     field. Im using OnAfterGetRecord to match all record with each picture file name  
   
5. Thats it finish and Save the Page.

With this small example, i hope it can help to save more space for database, for not
storing a BLOB data anymore, specially when someone need to store hundred or million
pictures. 

Note : for network based server ensure client's RTC have access to  data file (eg:image file in server) to do this grant access the image file for client users from windows network sharing control.