Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3846590
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:25:16+00:00 2026-05-19T16:25:16+00:00

iam using VFP 9.0…Iam making an invoice report, what i want to know is

  • 0

iam using VFP 9.0…Iam making an invoice report, what i want to know is how to change the contents of the report by changing lets say a combo box in a form. or be able to use select and where clause in the report…any help would be appreciated 🙂

EDITED FOR CLARIFICATION (per comments instead of direct add into question)

+-----------------+       +-------------------------+
|  Contract Form  |       |   Invoice Form          |
|                 |       |                         |
|                 |       | radioCustomer           |
| btnInvoiceForm -------> |    comboCustomersList   |
+-----------------+       | radioContract           |
                          |    comboContractsList   |
                          |                         |
                          | btnPreviewReport        |
                          +-------------------------+

If I click on the Preview Invoice button, show all records from contract table where customer id (FK) is = to the id picked from the combo box.

If I picked contract from the radio buttons, the contract combo box would work, showing a list of contract id(s), running the report then would show you the record from the contract table where contract id = the id picked from the combo box…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:25:17+00:00Added an answer on May 19, 2026 at 4:25 pm

    I’ve edited the message to hopefully better understand your layout of the form(s) with respective radio button combobox controls respectively enabled/disabled. I think you’ll need to draw up two distinct reports no matter what showing respective content, then call each one based on the radio button setting… Such as in the “btnPreviewReport” object CLICK event… I’ve roughed-in on the sample…

    if not empty( Thisform.radioControl.radioCustomer.Value )
       */ Customer radio button was selected
       xCustomerID = comboCustomersList.Value
    
       */ Run your Query
       select ... from YourTable where ... into cursor C_SampleCustomerData
    
       */ Run the report
       report form YourCustomerReport preview
    
    else 
       */ Contract radio button was selected
    
       */ Customer radio button was selected
       xContractID = comboContractsList.Value
    
       */ Run your Query
       select ... from YourTable where ... into cursor C_SampleContractData
    
       */ Run the report
       report form YourContractReport preview
    endif 
    

    Again, I tried the form as best from your description.

    EDIT — second comment clarification…

    The nice thing about reports in VFP is they do not pre-require any hard DBF() in the data environment. However, it would be good to have your data fields set to an Alias.Field reference you are EXPECTING to have. So, if your querying of the data for the Customer report should always have the same expected alias result…

    ex:
    // pre-close in case the alias we want was already left open previously
    use in select( "C_CustomerResults" )
    select c1.*;
       from YourCustomerTable c1;
       where c1.ID = SomeChosenID;
       into cursor C_CustomerResults readwrite 
    
    Then, in your report, have all your fields to something like
    
    C_CustomerResults.FirstName
    C_CustomerResults.LastName
    C_CustomerResults.OtherField
    

    This example uses an otherwise long alias name but just for clarification of handling.

    I would do a similar for your “contract” results alias. As long as that alias is in use, the report will run against whatever is the current table in use. Nothing fancy, no other prep, no data environment settings needed in the report…

    By pre-querying a sample of the data you would have in the report can help you in “roughing” the layout of your report. Then, finish your form to run the query and show the report and you’re done.

    EDIT — revised comment follow-up again

    Yes… for your customer invoice with multiple lines, same thing… however your report has a header band for things you want to only show once at the top of the page, and a detail band where you would want to show content for your “each line item” of the invoice, and a report footer to show any totals. Depending on complexity, you can add additional “Data Groups” in the report, but start with this now. It sounds like you need to get your feet wet with something working first before you expand on it.

    If VFP is your development platform, another website that has dedicated experts in VFP all the time is at http://www.UniversalThread.com. They also support other forums, but in VFP, they’ll get 100+ questions thrown at it a day…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

iam using c#,asp.net and iis, i want to simulate slow internet connection on my
HI all, Iam using VS2008 and SQL2008 i want to access my stored procedures
Iam using a telerik RadGrid and I want to check if GridDataItem is in
iam using jquery and want to do below written //this is a template <div
I have a select menu that iam using to change the laguage to this
Iam using Drupal 6. I want to implement Captcha in static pages. I have
I am trying to export vfp report to jpg using foxypreviewer . Im using
Iam using linq to entities and I want to get all Users that haven't
Iam using Devexpress aspxgridview control in asp.net. I want to reload the page on
In my codeigniter application i want to display the uri segments.Iam using ajax to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.