Query

P

Patti

I'm building a query and plan to tie it to a report that when opened they
could have a drop down list of the field they would like to display data for
report. Do you know how this can be done opposed to having several different
reports?
Thanks
 
G

Guillermo_Lopez

I'm building a query and plan to tie it to a report that when opened they
could have a drop down list of the field they would like to display data for
report. Do you know how this can be done opposed to having several different
reports?
Thanks

I dont think reports have dropdown lists.

First off, how similar/different are the reports? If its just a
different selection criteria like between certain dates or just pick
selected customers, than you can need to modify the query for each
different view. If you are using different queries, if they have the
same field names, you can change the record source of the report in
the _Load procedure.

You can use the _Load procedure to change everything in the report
before it runs. Here you would tie all the record sources to your
report. Then the user uses a form to select the information he/she
wants to see.

If the reports will have different formating and data is very
different, you are better off creating a new report for each.

Personally, unless the formating and data are almost the same, I
wouldnt use the same report. You'll spend more time making the changes
and coding than it would to just do a Save As and have a copy of the
report, and tweek it with the necesary information.

- GL
 
A

aaron.kempf

SQL Server Reporting Services makes this _QUITE_ easy.

you just have one combo box (Select OrderID, OrderName, CustPhone From
Orders Where OrderDate > GetDate()-12)
and a paramter (@OrderID) that is set from the 1st combobox.

and then you consume that parameter in the 2nd combobox

Select * from Orderdetails Where OrderID = @OrderID

Presto chango-- you're done.

With Access you need a half dozen forms and a ton of vb _AND_ SQL to
do this.

So which would you rather do-- spend a whole ton of time, coding in 2
different languages?
Or be done already, with a platform that is taking over the world
(Reporting Services).
 
T

Tony Toews [MVP]

Patti said:
I'm building a query and plan to tie it to a report that when opened they
could have a drop down list of the field they would like to display data for
report. Do you know how this can be done opposed to having several different
reports?

Please ignore Aaron's response mentioning SQL Server Reporting
Services as his reply is not the slightest bit relevant to your
question.

I would look at http://allenbrowne.com/ser-62.html for a sample that
may work for you.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

aaron.kempf

Tony;

I disagree. It's not irrelevent.
MDB / ACCDB is what is irrelevent.

SSRS would do this without any coding.
You can bind variables inside of SQL statements and SSRS is smart
enough to 'not run the SQL until the variable is filled'.

That is 1,000 times more beautiful and more powerful than _ANYTHING_
that MS Access offers anywhere.
No coding-- just SQL.

Thanks-- that makes it _MORE_ than relevent.
If you knew how to spell SQL or SSRS then maybe you'd have a tiny bit
of credibility.

Until then; go play with your midget databases.

-Aaron
 
A

aaron.kempf

Also- in SSRS you could easily have a comma seperated list of columns
that would be easy enough to dynamically display columns.

Personally; I use SQL Server for auditing reports.. Export all the
reports to a file share and then reimport them into a database.

5,000 _LARGE_ reports every day.

Probbaly more complex than anything you've ever imagined-- let alone
dealt with-- in your whole life.

The equations for this report-- can stretch up to ONE WHOLE PAGE each.

Would Access support that?

-Aaron
 
A

aaron.kempf

Furthermore; SSRS allows 'Report Builder' where end users can
_LITERALLY_ use drag and drop to make new reports-- based on a
predefined DB model-- without needing to do _ANY_ coding.

Its' delivered through an intranet page.

So-- anyone with a tiny bit of experiece-- can easily develop more
powerful reports than _ANYTHING_ available in MS Access.. without
writing a _DROP_ of code.

It's called ad-hoc reporting.

And Access doesn't have it.

Now call that irrelevent, Tony

-Aaron
 
Top