+ Reply to Thread
Results 1 to 2 of 2

SQL data to be sorted in Report

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Canada
    MS-Off Ver
    Office 2013
    Posts
    120

    SQL data to be sorted in Report

    It looks like I have to revamp my baby a bit, and was looking for some advice/assistance.

    [fluff]
    right now I use a stored procedure in SQL to process our various office phone lists. The report was pre-formatted to take the output from the SQL server one way, mainly sorting by last name. now that the use of this database is expanding to other cities, they each seem to need a different output style. So now I am stuck with either dynamic SQL (have been told to try and stay away from that) and having a more raw output from SQL then do the sorting in Access. So I am here for the latter.

    [what I need]
    So now I am looking at getting just the plain data from SQL, then based on what the user wants to sort by (drop down selection so it is very specific), I need to then create a header field (vba Left() of the sorted field), then generate the report that would do the sort. Hopefully all through VBA...

    first step:
    I run my pass thru (leaving out the bloat):
    Please Login or Register  to view this content.
    This was created over a year ago, and has not changed. I have to admit that I was quite green when I coded this, and do not remember all that I went through to get it like this. knowing what I know, I would need to insert some code before the DoCmd.OpenReport. here's where I am going to need help....

    from the data I get from the pass through, I need to then generate a new query so that I can create my Header field. I just don't know where to start. Like I said, this baby has been self sufficient for over a year, and my mind got stale... After the qdf stuff, how do I then take that and build a query that then calls a report?


    Thanks.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,910

    Re: SQL data to be sorted in Report

    If you right click on the returned data you will get a menu item. One of the selections is External Data Properties. One of the boxes that can be checked is Preserve column sort/filter/layout. Is this what you want?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to extratc data as weekly report and monthly report
    By Nisar.mohammed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-23-2014, 11:19 AM
  2. Need help breaking a report into mulitple sorted/formatted reports
    By tenscourts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2012, 03:44 PM
  3. Replies: 2
    Last Post: 06-29-2011, 04:35 PM
  4. Pull data from a matrix table into a report using 2 report conditions
    By bing in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-03-2008, 11:51 AM
  5. [SOLVED] Automate Excel report to place certain data into existing report?
    By Craig Harrison in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-25-2006, 09:00 AM
  6. [SOLVED] filtered sorted packing list report from data table
    By Lori H in forum Excel General
    Replies: 1
    Last Post: 07-22-2005, 09:05 AM
  7. Replies: 2
    Last Post: 06-25-2005, 02:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1