Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Unanswered: Graphs in Reports

    I have an interesting situation where I need to have a graph in a report, but the data sorce may be different depending on what the end user picks. I have set up a series of query deffs to handle the differnt choices and I am now trying to get the report to use the differnt query deffs as the data source for the graph. Im getting the error that I have entered a paramiter that is invalid to the rowsourcetype comand. It seems that the rowsourcetype and rowsource are not liked in a report. So what am i supposed to do to controle what the grpah usese as its source? Any help would be great
    Jim

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: Graphs in Reports

    Originally posted by JDionne
    I have an interesting situation where I need to have a graph in a report, but the data sorce may be different depending on what the end user picks. I have set up a series of query deffs to handle the differnt choices and I am now trying to get the report to use the differnt query deffs as the data source for the graph. Im getting the error that I have entered a paramiter that is invalid to the rowsourcetype comand. It seems that the rowsourcetype and rowsource are not liked in a report. So what am i supposed to do to controle what the grpah usese as its source? Any help would be great
    Jim
    I have run out of ways to do this and they are all wrong anyway. How do u change the rowsouretype and rowsource of a graph in a report in VBA?

    This is the last bit of code that I have used

    Reports![Report:_PCRKMS_Time_Trends]!Time.RowSourceType = "Table/Query"
    Reports![Report:_PCRKMS_Time_Trends]!Time.RowSource = "TRANSFORM Sum([FFEs]) AS [SumOfFFEs] SELECT [Time] FROM [Graph_ffe] GROUP BY [Time] PIVOT [years]"


    and that returns the error
    Run-time error 2455
    u have entered an expresion that has an invalid reference to the property rowsourcetype

    Whats going wrong here?
    Jim

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Red face Have you tried

    Assuming the user makes selections on a form...

    Base the recordsource of the chart on a query...

    the query refers to controls on the form...

    When they click "show report" dont close the form, hide it so that the query can still see the values selected.

    ???

    Hope you understand what I mean, if not post info on the selections the user can make
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Also

    Maybe you can only change when report is in design view?

    Open report in design view first.

    Change record source

    Open in preview/
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Second method

    Seems to work, knocked a quick test up - IE Probably no need for VBA
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  6. #6
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: Also

    Originally posted by garethdart
    Maybe you can only change when report is in design view?

    Open report in design view first.

    Change record source

    Open in preview/
    I beleve that the above mentioned solution is the only one that i can use because there are different querydeffs depending on what measure my end user selects, so i cant hard code one query deff to the report.
    Thanx for your help
    Jim

  7. #7
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    OK

    Mail me if you get stuck
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

Posting Permissions

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