Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > print report with dynamic selected columns


Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2004, 02:41 AM
oztan oztan is offline
Newcomer
 
Join Date: Jan 2004
Posts: 2
Unhappy print report with dynamic selected columns


i have very serious problem...
i create a project and one of my sub program required to print a report function.
so i design a program for this purpose..this sub program contain a DataGrid(DataGrid1), Text (Text1), and several buttons (cmdPrint, cmdExecute, cmdClear, cmdClose)..
the program is work like that..
user have to key-in the SQL command in the Text1 then click on the the execute button then the datagrid will display all the data from the SQL command....is working at here...
then i have to make the report rigth ??
here is the problem....(i used datareport as my report generater..)
when user key-in "select * from Table1" ....it work fine(select all columns)...
but if user key - in something like....."select Name, age from Table1"
then a problem is come up....an error message prompt up...
"datafield "address" not found...
(the address is one of the coulmns but this case i did't to select it...bcoz i don't want to print....)
so do u guys understand what is my purpose ?? my program want to allow users to select the column they need to print only....and not to print all.....
is there any solution ?? can give me any source code relevent to this program??
urgent....please.......................
Reply With Quote
  #2  
Old 01-07-2004, 06:31 AM
hardrain's Avatar
hardrain hardrain is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Manila, Philippines
Posts: 277
Default

Select that fields but just dont show it to the user.
__________________
It's been a while.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable print preview from xlDialogPrint w_seyller Excel 9 12-11-2003 11:20 AM
Print Selected Record from Form in Report Format mezshga Word, PowerPoint, Outlook, and Other Office Products 8 06-10-2003 01:53 PM
why does my code no longer work dapul General 4 11-07-2002 06:22 PM
Access Report Design nickg96 Database and Reporting 4 08-19-2002 01:12 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->