473,418 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Vertical table to Horizontal

have a page that dynamically builds forms input fields from a table allowing users to enter input into the form. Each input is a field in a _info table.

I would like report showing all of the entries of a user in one line. Each field entry is a row. So I need to take the vertical data and make it horizonal. There are many different forms with different configurations so must be dynamic. I’ve come across a lot of articles for cross-tab pivots but they only work for aggragates/sums.

The Registration_Info table has multiple entries for one form submission. I need to list these horazontal with each form_field.label as its fieldname for reporting.

Below is an example table layout:

FORM
——————————————
FORM_ID|FORM_NAME
500|“Custom Form 1″

FORM_FIELD
——————————————
FORM_FIELD_ID|FORM_ID|LABEL
1|500|“Field 1″
2|500|“Field 2″

REGISTRATION
——————————————
REG_ID|FORM_ID|USER_ID
23|500|45
24|500|98

REGISTRATION_INFO
——————————————
REG_ID|FORM_FIELD_ID|FIELD_VALUE
23|1|“My Name”
24|2|“My City”

Required Report Output:
REG_ID |Field 1 |Field 2 |FORM_ID |USER_ID
———————————————————————————————
23 |My Name |My City |500 |45
24 |Another Name |Another City |500 |98
Mar 8 '10 #1
1 2925
ck9663
2,878 Expert 2GB
You can actually aggregate strings by using MIN().

Happy Coding!!!

~~ CK
Mar 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Harlan Messinger | last post by:
Is IE6 known to have a bug whereby a vertical table cell border (with border-collapse: collapse), instead of stopping at the bottom of a horizontal border, sticks up into it by one pixel? My other...
5
by: Fizgig | last post by:
Hi, Below is code for creating a table with only vertical borders. I now use a table cell of 1px to create this effect. Is there a CSS alternative? Bye, Fizgig ####################
4
by: justdummy | last post by:
Hi, I am struggling with a problem for sometimes. I need to display a table in a html and if the height of the table goes beyond 200 px then a vertical scrollbar should alone appear without any...
3
by: WB | last post by:
Hi, I have a RadioButtonList that display a table of my products like so: <asp:RadioButtonList ID="RblProducts" runat="server" CssClass="text" RepeatColumns="4" RepeatDirection="Horizontal" />...
5
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up...
0
by: slakmagik | last post by:
Is there a way to declare horizontal positioning (without referring to or changing vertical) or vertical positioning (without referring to or changing horizontal) in a single declaration? ...
7
by: romeorion | last post by:
Hey, I'm new to CSS, working on a website I inherited. I have this css nav code. It's vertical and everyone want it to be horizontal. Can someone point out how to change this? body {...
1
by: bai | last post by:
In my page, I have both horizontal and vertical scroll bars. I want to to some action on Vertical scrollbar click/move and some other action on horizontal scrollbar move/click. How to know whether...
2
by: pbd22 | last post by:
Hi. I am trying to make a horizontal list that counts (downward) and a horizontal list that illustrates the time. Both list should be formatted the same (except for the nomenclature). I seem to...
0
by: skoyala | last post by:
Hi All, I need to put a horizontal scroll bar for 4 cells alone where my first cell in table should not contain any horizontal scroll bar but i need to put vertical scroll bar to both first and 4...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.