Convert.To​Byte and logical masks, from VB to LabVIEW

Hi guys,
I have to write a VI communicating via RS232 with a microcontroller for a PWM application. A colleague has given me the GUI he has developpd in VB and I would like to integrate it into my LabVIEW programme by converting the VB code into Labview code.  Here's the code:
Private Sub LoadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadButton.Click
        Dim bufLen As Integer = 12      // Buffer length
        Dim freq As Integer = 0      // frequency
        Dim pWidth As Integer = 0      // pulse width
        Dim dac As Integer = 0       // Value used in oscillator setting for generating pulse frequency
        Dim addr As Integer = 0      // Address of the pulse width in the pulse generator.
        Dim rTime As Integer = 0      // duration of machining/pulse train in ms.
        Dim returnValue As Byte = 0      // A variable for storing the value returned by the 
                                                       //microcontroller after it receives some data
        Dim buffer(bufLen) As Byte       // creates an array of bytes with 12 cells => buffer size = 8 x12 = 96 bits
// can you explain a bit please I know you're converting the entered values into byte and put them one by one in a specific order. This order is how the 
//microcontroller expects them
            addr = (Floor((pWidth - Tinh) / Tinc)) // Formula from hardware, calculates address setting for pulse generator to set pulse width.
            buffer(0) = Convert.ToByte(Floor(3.322 * (Log10(freq / 1039)))) // Caluclates OCT value for use in setting oscillator for pulse freq.
            dac = (Round(2048 - ((2078 * (2 ^ (10 + buffer(0)))) / freq)))  // Calculates DAC value for use in setting oscillator for pulse freq.
            buffer(1) = Convert.ToByte((dac And &HF00) >> 8)                         //
// &H is the vb.net to tell it its hex code, F00 gives the top 4 bits from a 12 bit value.
            buffer(2) = Convert.ToByte(dac And &HFF) // For values that are larger than 256 (8bits) the value needs to be split across 2 bytes (16 bits) this gets the //bottom 8 bits.  &H is the vb.net to tell it its Hex.
            buffer(3) = Convert.ToByte((addr And &HFF0000) >> 16) // This value may be so large it requires 3 bytes (24bits). This gets the top 8 bits.
            buffer(4) = Convert.ToByte((addr And &HFF00) >> 8) // This gets the middle 8 bits.
            buffer(5) = Convert.ToByte(addr And &HFF)// This gets the bottom 8 bits.
            buffer(6) = Convert.ToByte((rTime And &HFF0000) >> 16) //This value may also be 3 bytes long.
            buffer(7) = Convert.ToByte((rTime And &HFF00) >> 8)
            buffer(8) = Convert.ToByte(rTime And &HFF)
            buffer(9) = Convert.ToByte(2.56 * ocpBox.Value)  // The ocp pulse period is formed of 256 steps or counts, so if a percentage is requested, this formula gives the number of steps/counts required to set the pulse width
            buffer(10) = Convert.ToByte(tempBox.Value)
            If (tempCheck.Checked = True) Then
                buffer(11) = 1
            Else
                buffer(11) = 0
            End If
            freq = ((2 ^ buffer(0)) * (2078 / (2 - (dac / 1024))))
            pWidth = Tinh + ((((Convert.ToInt32(buffer(3))) << 16) Or ((Convert.ToInt32(buffer(4))) << 8) Or (Convert.ToInt32(buffer(5)))) * Tinc)
            ' Connect to device
            serialPort1.Write(1) // Sends the number 1. This tells the microcontroller we are about to start sending data. It should respond with a zero if it is ready 
                                         //and the connection is good.
The line "serialPort1.Write(buffer, 0, bufLen)" sends the buffered data where the variables are: buffer =  the buffered data; 0 = the position in the buffer to start from; bufLen = the position in the buffer to stop sending data.
What's the best way to deal with the Convert.ToBytes and the logical masks And ??
Thanks in advance for your time and consideration,
regards
Alex
Solved!
Go to Solution.

Try this
Beginner? Try LabVIEW Basics
Sharing bits of code? Try Snippets or LAVA Code Capture Tool
Have you tried Quick Drop?, Visit QD Community.

Similar Messages

  • Convertion to integer from array and logical mask

    hi all.
    please look at my VI.
    1)i want to convert this array to 4 display. each displaywill show one element(=1 row, in this case) from the array. 
        how i do it ?
    2) i need to make logical mask  to those numbers. how i convert the integer number to binary and make this logical mask ?
    with best regards
    pro111
    Message Edited by pro111 on 12-02-2006 05:41 PM
    Attachments:
    Untitled 2.vi ‏6 KB

    Hi pro,
    I did not follow you and came up with another example while Christian was doing his.
    This is my guess at what I thought you were asking.
    Ben
    PS Christian, I am not trying to side step your example. I figured if I drew it up I should post.
    PPS talk about a post collision!
    Message Edited by Ben on 12-03-2006 12:32 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    ConvetI32.JPG ‏76 KB

  • Drag and Drop Attachment from Outlook to LABVIEW

    Hi,
    I try to write a very simple program, which manages files. With the path control of LABVIEW we fortunately can Drag and Drop files from e.g. explorer, whose path I can use after dropping. The problem is, that I would like to do this directly with files from an Outlook mail attachment. Drag the attachment and drop it onto my LABVIEW window and be able to handle this file (copy elsewhere and rename it, for example)... That is what I dream of.
    I searched the internet for a long time, but I didn't find a solution.
    Thanks a lot for your help,
    yours,
    Daniel

    Probably not as easily. Drag & Drop in Windows is a complicated thing with the Server and Client negotiating a format to transfer. The server can offer many formats and the client then selects the one it can handle. The LabVIEW path control only can handle physical paths. So if the server application offers a path as one of the formats and then when the application selects that format makes sure that the file is copied somewhere in the filesystem (temporary path) and sends that path to the client, the LabVIEW path control will work fine. If the server application insists into memory stream only formats, the LabVIEW path control can not deal with them in any way. Outlook being a Microsoft product most likely insists in OLE formats and then you get into trouble.
    You basically need to interface to the Win32 or OLE Drag and Drop API to get this working. And no it's not trivial at all, because Drag and Drop not only varies greatly between platforms but also between OS versions.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How do i convert my music and pics over from windows to mac using a external hard drive.

    New mac user.  How do i convert my files from windows to mac using external hard drive.  I am using a Seagate freeagent go flex.

    leave as is and add NTFS driver to write to the drive / migrate maybe / reading NTFS drives isn't always perfect, some times external drive case has trouble mounting or staying mounted and suffers slow copy speed after awhile or with large files which is why I suggest Paragon NTFS for Mac OS X.

  • How can I retrieve the col data size and Null information from table using labview connectivity toolset

    Hi, there,
    I am wondering how to get the table information by labview database
    connectivity toolset. The table list vi comes with the toolset can get
    only col name, data type and data size. And I found the the data size
    always gives back -1, even though it is a string type. Do somebody has
    some idea about it?
    Thanks.
    JJ

    JJ,
    Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
    Crystal

  • Convert .AVF and .AVR files from satelite receiver to .TS files

    I am the owner of a Mac OS X 10.4.9 and a Echostar PVR 5020 satelite receiver. I like to burn a DVD of a programme saved on the hard disk of the satelite receiver. Via a USB connection I can connect my MAC with the receiver and copy the saved files. But till now I have not been able to find converion software and or some kind of hardware that enables me to convert the .AVF and .AVR files from Echostar to video .TS files. Please advise how to solve this.
    Best regards,
    Hans Lieverdink

    I looks like the AVF and AVR formats are privately used by EchoStar and not supported by anyone else. You will need to check with EchoStar to see if they can supply software to convert these formats. I supose there is a good possibilty the don't want you to be able to convert such files.
    Anyway, there is nothing we can do in this forum to help you. Good luck.

  • Receiver service ??? cannot be converted into an ALE logical system

    Hi,
    I am hoping for some help with an Idoc issue in XI version 3.0.  The scenario is like this:
    Flat file->File adapter->XI->Idoc adapter->R/3
    I have configured a scenario in one system like this that works fine.  But in the current system I am getting the error message "Receiver service ??? cannot be converted into an ALE logical system" from the Idoc adapter.
    As it is XI 3.0, I have set the Agency and Scheme in the destination communication channel to <Service>, ALE#LS and in the destination party, I have created a alternative identifier <Service>, ALE#LS, SYSCLNT200.
    I have configured an ALE logical system name in the SLD.
    I have cleared the SLD cache in the integration builder.
    The ALE logical system name was not in the SLD when the message first appeared, but I thought clearing the cache would fix that.  I have not tried deleting the service and re creating it.  That is my next step....if all else fails.
    Not sure what else I haven't tried.
    Can anyone offer any advice?

    Thanks Sam Raju for the reply.
    On your questions:
    1. I checked IDX1 - port for the receiving R/3 is defined as SAPIR1_300 (port: SAPIR1 and Client: 300) and it is mapped to RFC destination of IR1300.
    2. Checked RFC destination IR1300 - it is setup as R/3 connection and checked test connection and remote login and both are working fine
    3. Checked IDX5 - did find one message (status is successful) corresponding to the file I am sending into R/3 and this entry is an Outbound entry.
    Question: Should there be two entries here in IDX5 - one for inbound and the other for outbound?
    May be I am doing something wrong here in setting up the interface mapping and endpoints. Anyway when I check the IDOCOutbound in the Soap Header, I see the following:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:IDocOutbound xmlns:SAP="http://sap.com/exchange/MessageFormat/">
      <SAP:TABNAM>EDI_DC40</SAP:TABNAM>
      <SAP:MANDT>100</SAP:MANDT>
      <SAP:DOCNUM>0000000000008002</SAP:DOCNUM>
      <SAP:DIRECT>2</SAP:DIRECT>
      <SAP:IDOCTYP>FLIGHT_SAVEREPLICA01</SAP:IDOCTYP>
      <SAP:MESTYP>FLIGHT_SAVEREPLICA</SAP:MESTYP>
      <SAP:SNDPOR>SAPBXI</SAP:SNDPOR>
      <SAP:SNDPRN>PRISM</SAP:SNDPRN>  
      <SAP:SNDPRT>LS</SAP:SNDPRT>
      <SAP:RCVPOR>SAPIR1</SAP:RCVPOR>
      <SAP:RCVPRN>IR1CLNT300</SAP:RCVPRN>
      <SAP:RCVPRT>LS</SAP:RCVPRT>
      </SAP:IDocOutbound>
    Do you see anything wrong or missing here. SNDPOR is XI port, SNDPRN is the source partner (file) and RCV... information is all the receiving R/3.
    I am suspecting that something is missing either here or in the endpoint setup.
    Also, in the TechnicalRouting I have this:
    - <SAP:address version="20">
      <SAP:systemKey>IR1CLNT300</SAP:systemKey>
      <SAP:endpointType>IDOC</SAP:endpointType>
      <SAP:url>IDOC://SAPIR1?RFCDEST=IR1300&DOCREL=&VERSION=3&SAPREL=46C</SAP:url>
      </SAP:address>
    Any issues you see here in url?
    Also, when I look on the XI server, I do not see these files deposited anywhere- so they are going somewhere (as the status in IDX5 is successful)!
    Do I need to activate any queues or triggers anywhere.
    Can you please offer advice and help us out.
    Thanks again.
    Srini
    [email protected]

  • Anyone else waiting on a replacement Power Supply & Logic Board from Apple?

    On Dec. 26, I took my iMac G5 to my local service provider to resolve some power issues under the Repair Extension Program. They ordered the part (new power supply and logic board) from Apple that very day, yet I'm still stuck here waiting 16 days later.
    Anyone else out there waiting for this part to arrive? How long should it take? Can I call Apple directly in order to get a better estimate?
    Thanks!
    1.8 GHz iMac G5   Mac OS X (10.4.8)  

    All right, so here's the latest plot changes in the ongoing saga of my iMac G5...
    I spoke with two very kind and helpful women at Apple this afternoon. Both agreed that this sort of behavior from my AASP was certainly unacceptable. I was able to lodge a formal complaint against my AASP, as well.
    My particular part order was given some sort of high priority status by Apple. I was asked to call back on Friday to receive an update on the order's status.
    I was also asked to send a letter to Apple's Corporate Customer Care division explaining my situation in full. I'll try to send out this letter within the next few days.
    So that's where we stand right now. No computer yet, but at least SOME progress is being made.

  • Trying to understand the details of converting an int to a byte[] and back

    I found the following code to convert ints into bytes and wanted to understand it better:
    public static final byte[] intToByteArray(int value) {
    return new byte[]{
    (byte)(value >>> 24), (byte)(value >> 16 & 0xff), (byte)(value >> 8 & 0xff), (byte)(value & 0xff) };
    }I understand that an int requires 4 bytes and that each byte allows for a power of 8. But, sadly, I can't figure out how to directly translate the code above? Can someone recommend a site that explains the following:
    1. >>> and >>
    2. Oxff.
    3. Masks vs. casts.
    thanks so much.

    By the way, people often introduce this redundancy (as in your example above):
    (byte)(i >> 8 & 0xFF)When this suffices:
    (byte)(i >> 8)Since by [JLS 5.1.3|http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#25363] :
    A narrowing conversion of a signed integer to an integral type T simply discards all but the n lowest order bits, where n is the number of bits used to represent type T.Casting to a byte is merely keeping only the lower order 8 bits, and (anything & 0xFF) is simply clearing all but the lower order 8 bits. So it's redundant. Or I could just show you the more simple proof: try absolutely every value of int as an input and see if they ever differ:
       public static void main(String[] args) {
          for ( int i = Integer.MIN_VALUE;; i++ ) {
             if ( i % 100000000 == 0 ) {
                //report progress
                System.out.println("i=" + i);
             if ( (byte)(i >> 8 & 0xff) != (byte)(i >> 8) ) {
                System.out.println("ANOMOLY: " + i);
             if ( i == Integer.MAX_VALUE ) {
                break;
       }Needless to say, they don't ever differ. Where masking does matter is when you're widening (say from a byte to an int):
       public static void main(String[] args) {
          byte b = -1;
          int i = b;
          int j = b & 0xFF;
          System.out.println("i: " + i + " j: " + j);
       }That's because bytes are signed, and when you widen a signed negative integer to a wider integer, you get 1s in the higher bits, not 0s due to sign-extension. See [http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.2]
    Edited by: endasil on 3-Dec-2009 4:53 PM

  • Conversion failed when converting date and/or time from character string

    Hi experts,
    I'm trying running a query in Microsoft Query but it gives the following error message:
    "conversion failed when converting date and/or time from character string"
    when asks me the data I'm inserting 31-01-2014
    i've copy the query form the forum:
    SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
         CASE  WHEN T0.TransType=13 THEN 'Invoice'
              WHEN T0.TransType=14 THEN 'Credit Note'
              WHEN T0.TransType=30 THEN 'Journal'
              WHEN T0.TransType=24 THEN 'Receipt'
              END AS 'Document Type',
         T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
    FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    WHERE (T0.MthDate IS NULL OR T0.MthDate > ?) AND T0.RefDate <= ? AND T1.CardType = 'C'
    ORDER BY T1.CardCode, T0.DueDate, T0.Ref1

    Hi,
    The above error appears due to date format is differnt from SAP query generator and SQL server.
    So you need convert all date in above query to SQL server required format.
    Try to convert..let me know if not possible.
    Thanks & Regards,
    Nagarajan

  • My computer has been seen at Genius bar 6 times for freezing up, reloaded all original settings and even went to the apple shop where they replaced the battery and logic board. Still freezes after I try to reload iTunes stuff and app stuff from apple

    my computer has been seen at Genius bar 6 times for freezing up, reloaded all original settings, all of their diagnostics, and they even sent it to the apple shop where they replaced the battery and logic board. Still freezes after I try to reload iTunes stuff and app stuff from apple, especially iPhoto which is seems to refuse to load and then begins freezing up all over again. Anyone else have this problem. Other than this, I have had absolutely no problems with this computer. Now, it's a file of junk.

    Hi Ronald ...
    Have you checked lately to see how much free space there is on the disk? Especially since iPhoto freezes at launch ...
    Click your Apple menu icon top left in your screen. From the drop down menu click About This Mac > More Info > Storage
    Make sure there's at least 15% free disk space.
    And make sure the OS X software is up to date.
    Click the Apple  top left in your screen.
    From the drop down menu click:   Software Update
    If you have anti virus software installed or are using third party Mac cleaning utiliites, that may be part and parcel of the your problems.

  • How do I copy and paste text from a converted Word document?

    I just converted a pdf file into word.  I want to copy and paste the informatiuon into another document.  How do I do that?

    Hi Sara.  Tanks for responding.  If I cannot figure this out (I  was up
    until 2am last night), I want to cancel my subscription.
    Here are two files you can check on/help me with.  When I try again,  it
    comes up 'an error has occurred when trying to access the service.'
    Please advise.
    Pat Tomassi
    In a message dated 11/1/2014 12:55:23 A.M. Eastern Daylight Time, 
    [email protected] writes:
    How  do I copy and paste text from a converted Word document?
    created by Sara.Forsberg (https://forums.adobe.com/people/Sara.Forsberg) 
    in Adobe Acrobat.com Services - View the full  discussion
    (https://forums.adobe.com/message/6888908#6888908)

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • I need to transfer up to 200 pages and keynote files from my macbook to my PC. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as word-friendly?

    I need to transfer up to two hundred Pages and Keynote files from my macbook running on Mac OS X 10.6.8 to my PC running windows. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as a word-friendly file?

    I need to transfer up to two hundred Pages and Keynote files from my macbook running on Mac OS X 10.6.8 to my PC running windows. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as a word-friendly file?

Maybe you are looking for

  • I have two iphones and one Apple id. Pretty confused how to have different content on them.

    Hi All, I have my old iphone 5s and recently I bought a iphone 6. What I want to do is to use same apple id on both of them, but I want to have different apps and media on them. I plan to use the iphone 5s as my 2nd phone, so I do not need same apps/

  • How to convert .iso to .img

    i am being driven absolutely madd by my computer. all i want to do is a simple task, yet hours of my life have now been drained. so to save the rest of my time as well as others in the future, how does one convert a .iso file to .img on a mac? (yes,

  • Is there a way to get an export to Adobe Epub in Pages 08?

    Is there a way to get an export to Adobe Epub in Pages 08? If so, may I please know how? I want to create an ebook...

  • Where is my Acrobat serial number?

    I do not know where my Acrobat serial number is? So I can not download ANY pdf files. Every time I try to down a file it says you must start Acrobat to continue, then it asks for a serial number. WHERE IS IT????

  • Determine last access of a filesystem?

    I have a filesystem that I'd like to unmount if it goes unused for X amount of time. Is there a clean(ish) way to determine how long its been since a filesystem was last accessed? I've written a script that simply lists all files on the file system,