Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Help with SHAPE command

tttafftttaff Posts: 1Member
I'm trying to use the SHAPE command create a hierarchical recordset for a report in VB6. I'm using the Data Report Designer in VB and an Access database. This is a report of all client activity for a specified date range. I have a parent Client table with two child tables, FoodService and PaymentHistory.

Client table: ClientID, LastName, FirstName, Address, SocialSecurityNumber
-----FoodService Table: FoodServiceID, ClientID, FoodServiceDate, FoodServiceType, NumberOfBags, Comments
-----PaymentHistory table: PaymentID, ClientID, PaymentDate, PaymentType, AmountReceived, AmountRequested, Comments

Somehow, I want to combine the FoodService and PaymentHistory records for the specified date range into one child record under the parent Client record that would look something like this:

Parent Client: ClientID, LastName, FirstName, Address, SocialSecurityNumber
---- Child: ServiceDate, ServiceType ("Food" or "Payment"), ServiceDescription, Amount1 (number of bags), Amount2 (amount requested), Amount3 (amount received),ServiceComments

Since the two child tables are a little different from each other, I don't know how to combine them into one record that I can then use to create one line item for the report.

Is there a way to do this with the SHAPE command?

Tim

Comments

  • Termc1224Termc1224 Posts: 84Member
    : I'm trying to use the SHAPE command create a hierarchical recordset
    : for a report in VB6. I'm using the Data Report Designer in VB and an
    : Access database. This is a report of all client activity for a
    : specified date range. I have a parent Client table with two child
    : tables, FoodService and PaymentHistory.
    :
    : Client table: ClientID, LastName, FirstName, Address,
    : SocialSecurityNumber
    : -----FoodService Table: FoodServiceID, ClientID, FoodServiceDate,
    : FoodServiceType, NumberOfBags, Comments
    : -----PaymentHistory table: PaymentID, ClientID, PaymentDate,
    : PaymentType, AmountReceived, AmountRequested, Comments
    :
    : Somehow, I want to combine the FoodService and PaymentHistory
    : records for the specified date range into one child record under the
    : parent Client record that would look something like this:
    :
    : Parent Client: ClientID, LastName, FirstName, Address,
    : SocialSecurityNumber
    : ---- Child: ServiceDate, ServiceType ("Food" or "Payment"),
    : ServiceDescription, Amount1 (number of bags), Amount2 (amount
    : requested), Amount3 (amount received),ServiceComments
    :
    : Since the two child tables are a little different from each other, I
    : don't know how to combine them into one record that I can then use
    : to create one line item for the report.
    :
    : Is there a way to do this with the SHAPE command?
    :
    : Tim
    :

    try using an aggregation function in your query. i combine 3-4 tables b4 just to satify a user with her report. just research about it and learn all its function. hope to help

    I'm the best there is,
    the best there was,
    and the best there ever will be.
    hahahahaha lolz :)
Sign In or Register to comment.