Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Report Generator

Reply
Thread Tools

Report Generator

 
 
Paulo
Guest
Posts: n/a
 
      07-07-2009
I need a report generator... I think it's cool the own user select the
columns he/she wants to display... Have you seen anything?

Maybe a SilverLight with asp.net or classic asp (I dont know if SL can be
used with classic asp...) Can you suggest me something?

THanks



 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      07-07-2009
Gazing into my crystal ball I observed "Paulo" <(E-Mail Removed)>
writing in news:u#RNiGx$(E-Mail Removed):

> I need a report generator... I think it's cool the own user select the
> columns he/she wants to display... Have you seen anything?
>
> Maybe a SilverLight with asp.net or classic asp (I dont know if SL can
> be used with classic asp...) Can you suggest me something?
>
> THanks
>
>
>
>


It depends on what kind of database you have on the backend. Basically,
what you would want to do is show a list of columns with input checkbox
markup, submit that form to itself, and on post, get the columns, run
the query and present it to the user.

<%
if request.servervariables("Request_Method") = "POST" then
hasselected = true
columns = request.form("column")
sql = "SELECT " & columns & " FROM table "
if(request.form("whereclause") <> "" then
sql = sql & " WHERE " & whereclause
end if
set rs = createobject("ADODB.Recordset")
rs.open sql, connectiontodb
rsarr = rs.getrows()
rs.close
set rs = nothing
else
'query to get the column names into a recordet
hasselected = false
set rs = createobject("ADODB.Recordset")
rs.open sql, connectiontodb
colsarr = rs.getrows()
rs.close
set rs = nothing
end if
%>
<% if not hasselected then %>
<form method="post" action="<%=request.servervariables
("SCRIPT_NAME")%>">
<label for="columns">Select Columns</label>
<% for i = 0 to unbound(colsarr,2)%>
<input type="checkbox" id="columns<%=i%>" name="column" value="<%
=colsarr(0,i)"%>"><%=colsarr(0,i)%><br>
<% next%>
<input type="submit" value="Submit">
</form>
<% else %>
<p>The results of your query are:</p>
<% 'loop through the rsarr array to show the results of the
query%>
<% end if%>





--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generator functions subclass generator? Terry Reedy Python 0 06-18-2009 09:51 PM
Problems with email.Generator.Generator Chris Withers Python 20 09-12-2006 11:13 AM
UART with fractional baudrate generator ? Or fractional baudrate generator alone Martin Maurer VHDL 3 04-19-2006 01:26 PM
subtle side effect of generator/generator expression bonono@gmail.com Python 9 10-16-2005 06:42 PM
generator function within a generator function doesn't execute? TheDustbustr Python 1 07-25-2003 10:45 AM



Advertisments