Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL coding for reports

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-12-05 : 08:14:10
sid writes "The situation is something like this. We have 100 forms. And two tables for these.
The first table has two columns and it consists of the form_id and the second column consists of the fields present for each form id. Typically each form will have around 20-30 fields.

The second table consists of all the fields in all the forms as columns and the form_id column as well. When data is entered into each form, it is populated in the second table at the particuar fields using the mapping from the first table.

Now I have to generate a report such that, it takes form id as the parameter and then show just the fields used in that form in the report. That is : it should dynamically change the number of rows visible for the report. "

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2005-12-05 : 09:26:25
Can you give some more details like table defs and sample data? Per your definition of the situation it sounds like if the form is filled in a second time it would simply replace the values from the first time it was filled in. Thus, I'm assuming there must be some kind of instance value column that you haven't described yet.

Secondly, are you looking to see just the fields that are used for the form in the report, or the values on the forms for the field? As you've stated the question it sounds like you could simply make a query against the the first table since it has the form id and the names of the fields used for it.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-06 : 00:48:36
Is that similar to this?
http://sqlteam.com/forums/topic.asp?TOPIC_ID=53384

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -