Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

creating a report from sql server data

Discussion in 'Information Technology' started by sisernhagen@gmail.com, Jul 28, 2006.

  1. sisernhagen@gmail.com

    Expand Collapse

    I created an access front-end to a sql server database and I'm stuck
    trying to generate a report via a event procedure. I purposely am not
    using linked tables and instead connect to the DB using a ADO
    connection string. I cant figure out how to base a report on a query
    where the tables are not linked. I want to be able to use a ADO
    connection string to query the db and base a report on it. How do I do

    Any ideas would be extreamly appreciated!!!


  2. Loading...

    Similar Threads Forum Date
    Canada Ottawa weighs creating ambassador for religious freedom Breaking News Oct 4, 2011
    India SGPC Accused of Creating a Row Breaking News Jan 20, 2011
    Pacific International Gathering of Young Sikhs Focuses on Creating Good Citizens Breaking News Jan 8, 2011
    Are We Creating New Devtas? Sikh Sikhi Sikhism Aug 21, 2009
    Sikh News Sharif warns against creating instability in Punjab (Express India) Breaking News Sep 19, 2008

  3. shumaker@cs.fsu.edu

    Expand Collapse

    This is an example of how I create a report in an Access Data Project
    that uses SQL server 2000 as back end, this is in the Report Open
    event, and I think CountsCombined is a function or stored procedure. I
    construct the string using user selected values in a custom form, and
    then call up the report passing the string as a parameter. Then in the
    reports on open event I get the paramter and set it to Me.RecordSource:

    strRecordSource = "Exec CountsCombinedDescrNoSumChild '" &
    Me![BeginDate] & "','" & Me![ChildCombo] & "','118'"

    So basically you use the "Exec" keyword followed by the query name and
    comma seperated list of parameters, each one in single quotes. I'm not
    sure the details of if the query name has to be the name of an existing
    SP, view, or function.

Share This Page