• Chart query problems (2000 SP-3)

    Author
    Topic
    #409878

    Hi,

    I’m trying to create a chart report that’s based on a query with parameter prompts. Is that possible? I keep running into errors. Also, I’m trying to populate one of the parameter prompts with a list of values from a table but again have had no luck. I tried walking through a help topic titled “Use a form to enter report criteria” but it didn’t work as I hoped.

    Thanks,
    Bob

    Viewing 1 reply thread
    Author
    Replies
    • #876965

      You should be able to use parameter queries as a data source for a report, but you may need to explicity define the characteristics of the parameters. In addition, you may well receive multiple prompts for the parameter as the report is formatted, and if you preview then print, you will receive a prompt for the preview and a prompt for the print. If you are dealing with complex parameters, it is generally better to use the form approach where the parameters are stored in text boxes on a form. We’ll need more details on what happened when you tried the form approach to provide additional assistance.

      • #877242

        When I run the report, the form comes up, but it doesn’t include the list of values from the Employee Name field of the Employee Record table. I hit OK just to move on, and then an Enter Parameter Value dialog box appears with the criteria that I entered in the report query for this value (Forms!Employee Name!Employee).

        Also, with the other part of my question, when I try to create a chart report with a parameter query, the wizard walks through each step with no apparent problems, but when I run the report, the chart comes up blank.

        Thanks,
        Bob

        • #878354

          I’ve tried another angle on this issue. I’m starting from a popup form that has a lookup field for the employee name. When I press the OK button, the value from this lookup field is used as a criterion in the report query.

          However, the form field value isn’t getting passed to the query. I’ve put a message box in the query Visual Basic code and it shows a value being captured on the form. I’ve also run the query by itself with a sample value and there’s no problem there. The SQL also looks good.

          The query result is just a blank table. Does anyone know what could be happening?

          Thanks,
          Bob

          • #878362

            Is your form control a text box or a combo box? If it’s a combo box, then the value your are storing on the form is the left-most or zero column (combo columns start with zero) so it may not be the data type your query is expecting. For example, if the combo box is looking up people and you are displaying the name, more than likely the combo box is actually working with some sort of Person ID which is the primary key of the People table.

          • #878363

            Is your form control a text box or a combo box? If it’s a combo box, then the value your are storing on the form is the left-most or zero column (combo columns start with zero) so it may not be the data type your query is expecting. For example, if the combo box is looking up people and you are displaying the name, more than likely the combo box is actually working with some sort of Person ID which is the primary key of the People table.

        • #878355

          I’ve tried another angle on this issue. I’m starting from a popup form that has a lookup field for the employee name. When I press the OK button, the value from this lookup field is used as a criterion in the report query.

          However, the form field value isn’t getting passed to the query. I’ve put a message box in the query Visual Basic code and it shows a value being captured on the form. I’ve also run the query by itself with a sample value and there’s no problem there. The SQL also looks good.

          The query result is just a blank table. Does anyone know what could be happening?

          Thanks,
          Bob

      • #877243

        When I run the report, the form comes up, but it doesn’t include the list of values from the Employee Name field of the Employee Record table. I hit OK just to move on, and then an Enter Parameter Value dialog box appears with the criteria that I entered in the report query for this value (Forms!Employee Name!Employee).

        Also, with the other part of my question, when I try to create a chart report with a parameter query, the wizard walks through each step with no apparent problems, but when I run the report, the chart comes up blank.

        Thanks,
        Bob

    • #876966

      You should be able to use parameter queries as a data source for a report, but you may need to explicity define the characteristics of the parameters. In addition, you may well receive multiple prompts for the parameter as the report is formatted, and if you preview then print, you will receive a prompt for the preview and a prompt for the print. If you are dealing with complex parameters, it is generally better to use the form approach where the parameters are stored in text boxes on a form. We’ll need more details on what happened when you tried the form approach to provide additional assistance.

    Viewing 1 reply thread
    Reply To: Chart query problems (2000 SP-3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: