dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Need shape command in vb6 for data report from three access data table

  1. #1
    Join Date
    Dec 2018
    Posts
    6

    Need shape command in vb6 for data report from three access data table

    Nstring = "Shape {Select distinct p.PRODUCTNAME,s.productid,s.orderno " & _
    "From (SALESORDERITEMS as s INNER JOIN PRODUCTMASTER as P ON s.PRODUCTID = P.PRODUCTID )" & _
    "WHERE ORDERNO='" & Text2.Text & "'} AS COMMAND1 APPEND ({SELECT SITEMSERIAL,PRODUCTID,ITEMCODE,UNIT,SOLDQTY," & _
    "RATE,DISCOUNT,QTYDISC,CASHDISCOUNT,SGST,CGST,GROSSAMT FROM SALESORDERITEMS WHERE ORDERNO='" & Text2.Text & "'" & _
    " ORDER BY PRODUCTID,ITEMCODE} AS ORDERS " & _
    " Relate 'PRODUCTID' To 'PRODUCTID') AS ORDERS"


    - This code is working as per the attached report . But I have one more table ITEMDETAILS having fileds 'PRODUCTID','ITEMCODE','ITEMNAME'
    - How to add ITEMDETAILS.ItemName field along with this query and need to add in the Data report Details[Section 1} along with salesorderitems.productid,_
    - Itemcode,unit,rate,qty,discount etc.
    - So please help me how to create the above query including Field ITEMNAME from Table ITEMDETAILS.
    /------------------------------------------------------

    See the attached Image. I want to fill column 'ItemName' in data report [Detail Section 1 ] . Now it is blank. How to change my code.

    HOPE YOU UNDERSTAND MY QUESTION Name:  Darareport1.jpg
Views: 104
Size:  38.0 KB

    THANKS
    SAJIKUMAR V
    Last edited by sajikumarv; December 23rd, 2018 at 05:37 AM.

  2. #2
    Join Date
    Dec 2018
    Posts
    6

    Re: Need shape command in vb6 for data report from three access data table

    Arjay . Please send me your reply

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,544

    Re: Need shape command in vb6 for data report from three access data table

    Don't be so impatient. Remember there are time zone differences across the world and that it is also the holiday season for many countries. I'm sure that Arjay will reply at some point when it is convenient for him. Don't also forget that gurus volunteer to try to answer questions in their own time and don't get paid.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.9.4)

  4. #4
    Join Date
    Dec 2018
    Posts
    6

    Re: Need shape command in vb6 for data report from three access data table

    Thanks 2kaud, I will wait for reply for my post..... thanks again

  5. #5
    Join Date
    Dec 2018
    Posts
    6

    Re: Need shape command in vb6 for data report from three access data table

    I edited my question... and now you can clear to read and understand
    Thanks in Advance

    Sajikumar V

  6. #6
    Join Date
    Dec 2018
    Posts
    6

    Re: Need shape command in vb6 for data report from three access data table

    who can help me. please . waiting your reply

  7. #7
    Join Date
    Dec 2018
    Posts
    6

    Re: Need shape command in vb6 for data report from three access data table

    At Last I found the solution. Please do it for all viewers for the following

    My Query is:-

    Nstring = "Shape {Select PRODUCTNAME,SITEMSERIAL,S.ITEMCODE,ITEMNAME,S.UNIT,S.SOLDQTY,S.RATE,S.DISCOUNT,S.CASHDISCOUNT,S.QTYDISC,S.GROSSAMT,S.SGST,S.CGST,S.ORDERNO " & _
    " from PRODUCTmaster,salesorderitems S,itemdetails WHERE ORDERNO='" & Text2.Text & "' AND S.PRODUCTID=PRODUCTMASTER.PRODUCTID AND" & _
    " S.PRODUCTID=ITEMDETAILS.PRODUCTID AND S.ITEMCODE=ITEMDETAILS.ITEMCODE } as prodgroup compute prodgroup BY 'PRODUCTNAME' AS PRODN "

    then I added TextBox in DATA REPORT [ Group Header(Section 6 )] and give property Datafield= PRODN and Datamember =""

    Then the added textbox for all the other columns in Data Report-Detail(Section1) and property Datafield is the same column name and Datamember=PRODGROUP

    Then try you will get report like following [attached image ]
    Name:  Untitled.jpg
Views: 31
Size:  45.6 KB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)