Hi folks,
New to RS, but have this really annoying colleague b*tching about
coversheets and TPS reports. (Sorry, off-topic).
Anyways, I've been ranting about the wonders of SQL RS to him, and then
he turns up wanting me to actually do a real report for him. In the
sample below, I'm using the Northwind database.
Basic idea is: You select a year in a combobox and run the report.
The report then shows the quanties sold for each product for that year
in one column, and in the next column it shows the equivalent data for
the previous year.
Tables used in this sample: Orders, OrderDetails and Products.
Hope someone can help me. :-)
-McWawa, the next President of The United States of America.
---
Select Year: 1999 |
2000 |
2001 | <- these are in a combobox
2002 |
2003 |
Products | 2001* | 2000**
---
Produkt A | 145 | 84
Produkt B | 200 | 129
Produkt C | 101 | 88
.. | ... | ...
.. | ... | ...
Produkt Z | 140 | 31
* = The Year selected in the combobox
** = The Year BEFORE the on selected in the combobox
---What exactly do you need help with?
This is a fairly straightforward report. Just create a parameter to allow
the user to select a year, run your query based upon the parameter, and
populate your simple table with the results.
What specifically are you having a problem with?
"McWawa" <n@.dachanche.ever> wrote in message
news:uuStdiczGHA.3512@.TK2MSFTNGP04.phx.gbl...
> Hi folks,
> New to RS, but have this really annoying colleague b*tching about
> coversheets and TPS reports. (Sorry, off-topic).
> Anyways, I've been ranting about the wonders of SQL RS to him, and then he
> turns up wanting me to actually do a real report for him. In the sample
> below, I'm using the Northwind database.
> Basic idea is: You select a year in a combobox and run the report.
> The report then shows the quanties sold for each product for that year in
> one column, and in the next column it shows the equivalent data for the
> previous year.
> Tables used in this sample: Orders, OrderDetails and Products.
> Hope someone can help me. :-)
> -McWawa, the next President of The United States of America.
>
> ---
> Select Year: 1999 |
> 2000 |
> 2001 | <- these are in a combobox
> 2002 |
> 2003 |
>
> Products | 2001* | 2000**
> ---
> Produkt A | 145 | 84
> Produkt B | 200 | 129
> Produkt C | 101 | 88
> .. | ... | ...
> .. | ... | ...
> Produkt Z | 140 | 31
>
> * = The Year selected in the combobox
> ** = The Year BEFORE the on selected in the combobox
>
> ---|||> This is a fairly straightforward report. Just create a parameter to allow
> the user to select a year, run your query based upon the parameter, and
> populate your simple table with the results.
> What specifically are you having a problem with?
Well, I think my problems may be caused by my lack of tsql experience.
If you (or anyone) could point me in the right direction with the query, I
think I could piece the report together from that.
McWawa|||Solved it through my query. :-)
Saturday, February 25, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment