CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2010

    Data Report Issue


    I had designed an application.

    I want Report like as follows using Data Grid.

    Date: Page 1 of 1

    Region : North

    Port Name Quantity FOB UP
    XYZ 100 100 1
    KLM 200 200 1
    ABC 650 650 1
    FGH 722 72000 100
    Region Total 1672 72950

    Region : South

    Port Name Quantity FOB UP
    KLM 100 100 1
    UVW 200 200 1
    RST 650 650 1
    IJK 722 72000 100
    Region Total 1672 72950

    Grand Total 3344 145900

    My Query:

    select ROW_NUMBER()OVER (ORDER BY er.Port_Name) AS Row,er.Port_name,pm.Region,
    sum(Quantity) Quantity,sum(Fob) Fob,convert(numeric(18,2),sum(Fob)/sum(Quantity)) Unitprice
    from Exporter_Returns er join Exporter_Master em on er.exporter_id=em.exporter_id join
    port_master pm on pm.port_name=er.port_name where returns_month
    between '2010-01-01' and '2013-08-01' and quantity!=0 group by er.Port_Name,pm.Region

    Please find my Report Design. But I am unable to grouping. There is error message.

    Name:  Report Design.jpg
Views: 223
Size:  74.1 KB

    I didn't use Data Environment.

    I request you to please help me to get the output like as above.

    Thanks in advance.



  2. #2
    Join Date
    May 2005
    Sterling Heights, MI

    Re: Data Report Issue

    What is the error message and what line of code is throwing it?
    Got a question on Linux? Visit our Linux sister site.
    Why Bound Controls Are Evil
    IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

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)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.