473,385 Members | 1,548 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,385 software developers and data experts.

To create an application which select report and fetches all fields stored in View

Hi All,
Iam new in asp.net 2003 and sql server. I have to create an application having following criteria.

Proposed Steps

1. Create a table containing fields as Name of Report, View Name or Query in the database.

2. In the User Interface Label box, Combo box, Command Button, Table and web grid 5.2 controls are used.

3. First in the Combo Box user selects a report and click on the Command button. Inside Command button click event method, a query is fired taking report name as parameter which fetches all the fields of the corresponding View stored in the Custom_Rep_Table.

4. After fetching all the fields from the View, these fields are displayed in the table created dynamically. Corresponding to the fields there are specific Checkboxes and textboxes.

5. User specifies the values for the fields in the textboxes and checked out the checkbox(s) and clicks on the second Command Button. Inside the second command button click event method a query is fired which takes the parameters in the table which are checked and according to the parameters displays all the records inside the view in the Web Grid.

Any suggestions
Feb 4 '08 #1
2 1572
myth0s
32
Hi All,
Iam new in asp.net 2003 and sql server. I have to create an application having following criteria.

Proposed Steps

1. Create a table containing fields as Name of Report, View Name or Query in the database.

2. In the User Interface Label box, Combo box, Command Button, Table and web grid 5.2 controls are used.

3. First in the Combo Box user selects a report and click on the Command button. Inside Command button click event method, a query is fired taking report name as parameter which fetches all the fields of the corresponding View stored in the Custom_Rep_Table.

4. After fetching all the fields from the View, these fields are displayed in the table created dynamically. Corresponding to the fields there are specific Checkboxes and textboxes.

5. User specifies the values for the fields in the textboxes and checked out the checkbox(s) and clicks on the second Command Button. Inside the second command button click event method a query is fired which takes the parameters in the table which are checked and according to the parameters displays all the records inside the view in the Web Grid.

Any suggestions
You could use :

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME LIKE 'reportsForMyApp_%'

This would list all the views whose name starts with "reportsForMyApp". You can also store the name of the views in a table created specificly for that.

After the user selects the report he wants, you can list the columns in the view with :

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'viewName'

You can use the result set to list the available column names to the user. After he selects what he wants, you can include those fields in a query that would looks like

SELECT [insert what the user has choosed here] FROM [the table name]


Hope this helps
Feb 4 '08 #2
thankx

But my problem is different. Actually in Userinterface i have a form which contains
a drop down list box in that reportname which is stored as a record is populated.
After that when user clicks a report in ddl , the corresponding view which is also stored as record in the table is selected and the query returns the fields in the view and we have to display that fields in the table
Feb 5 '08 #3

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

Similar topics

4
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
0
by: CSDunn | last post by:
Hello, I have a format issue on an Access 2000 ADP report that I am going to attempt to explain from a 'ten thousand foot view' : I have an Access 2000 ADP report that has a SQL Server 2000...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
0
by: rayone | last post by:
Hi folks. I need advice. 2 options, which do you think is the better option to display/retrieve/report on the data. Keep in mind reporting (Crystal), SQL Performance, VB Code, usability,...
9
by: itmags | last post by:
I need to create a couple of reports, invoices, credit reports, etc... My question is: How/what is the best way to go about this using VB2005 / SQL Server 2000 Crystal Reports? MS Reporting?...
4
by: Abdhul Saleem | last post by:
Hi, I am recieving error ActiveX component can't create object in the following line in the asp page. set ExcelApp = CreateObject("Excel.Application") Previously this code was working fine....
2
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.