Solved

access crosstab query for subreport with multiple rows

Posted on 2015-02-16
2
76 Views
Last Modified: 2015-03-11
I am needing to get a result from a joined table  for a subreport
I need
RequestID|Qty|ItemNumber|InvoicePrice|correctPrice

here is sample of a dataset with same requestID there can be are mutilple requestID for data
RequestValueID      RequestID      FieldDescription      CreditReasonFieldID      RequestValue      SortOrder
470479      82307      Quantity      3      1      1
470480      82307      Quantity      3      1      1
470481      82307      Quantity      3      3      1
470482      82307      Quantity      3      1      1
470483      82307      Quantity      3      1      1
470484      82307      Quantity      3      2      1
470485      82307      Quantity      3      1      1
470486      82307      Quantity      3      1      1
470487      82307      Quantity      3      7      1
470488      82307      Quantity      3      1      1
470489      82307      Quantity      3      1      1
470490      82307      Quantity      3      2      1
470491      82307      Quantity      3      5      1
470492      82307      Quantity      3      1      1
470493      82307      Quantity      3      1      1
470504      82307      Item Number      4      85006      2
470505      82307      Item Number      4      85863      2
470506      82307      Item Number      4      86212      2
470507      82307      Item Number      4      86213      2
470508      82307      Item Number      4      86230      2
470509      82307      Item Number      4      86445      2
470510      82307      Item Number      4      86448      2
470511      82307      Item Number      4      125032      2
470512      82307      Item Number      4      125039      2
470513      82307      Item Number      4      126035      2
470514      82307      Item Number      4      126039      2
470515      82307      Item Number      4      4-010793-00      2
470516      82307      Item Number      4      4-048493-00      2
470517      82307      Item Number      4      5-18537      2
470518      82307      Item Number      4      5-18541      2
470519      82307      Invoiced Price      5      130.13      3
470520      82307      Invoiced Price      5      51.85      3
470521      82307      Invoiced Price      5      51.05      3
470522      82307      Invoiced Price      5      51.05      3
470523      82307      Invoiced Price      5      11.51      3
470524      82307      Invoiced Price      5      16.02      3
470525      82307      Invoiced Price      5      16.02      3
470526      82307      Invoiced Price      5      58.06      3
470527      82307      Invoiced Price      5      58.06      3
470528      82307      Invoiced Price      5      68.07      3
470529      82307      Invoiced Price      5      68.07      3
470530      82307      Invoiced Price      5      105.37      3
470531      82307      Invoiced Price      5      31.28      3
470532      82307      Invoiced Price      5      188.19      3
470533      82307      Invoiced Price      5      188.19      3
470534      82307      Correct Price      6      120.00      4
470535      82307      Correct Price      6      42.80      4
470536      82307      Correct Price      6      46.00      4
470537      82307      Correct Price      6      46.00      4
470538      82307      Correct Price      6      9.80      4
470539      82307      Correct Price      6      13.70      4
470540      82307      Correct Price      6      13.70      4
470541      82307      Correct Price      6      49.00      4
470542      82307      Correct Price      6      49.00      4
470543      82307      Correct Price      6      49.00      4
470544      82307      Correct Price      6      49.00      4
470545      82307      Correct Price      6      99.70      4
470546      82307      Correct Price      6      4.40      4
470547      82307      Correct Price      6      144.00      4
470548      82307      Correct Price      6      144.00      4
470549      82307      Quantity      3      1      1
470550      82307      Item Number      4      86446      2
470551      82307      Invoiced Price      5      16.02      3
470552      82307      Correct Price      6      13.70      4
0
Comment
Question by:KurtRoss
2 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40612949
?
You leave us guessing.

/gustav
0
 
LVL 10

Expert Comment

by:Gozreh
ID: 40613512
You can not create a crosstab with one RequestID, it can give you only one result for each RequestID.

TRANSFORM First(Table1.RequestValue) AS FirstOfRequestValue
SELECT Table1.RequestID
FROM Table1
GROUP BY Table1.RequestID
PIVOT Table1.FieldDescription;
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question