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

Allowing users to select column from a table to print report.

I have two forms. One form is where user enters the search criteria and then on the second form he sees the search results where he has the ability to update, delete the records.

My question the table has 18 columns and it is not possible to fit all those columns on the report. I am looking for a solution where after the results of the query has been viewed in the bottom of the form the user could select the columns on the results form and view the report. Or when the user is entering search criteria I ask him to select the columns he wants on the report. Is this something that can be done in VB and Access

Thanks
Jan 18 '12 #1
2 2367
Mihail
759 512MB
Hi !
Is possible to fit all your columns in the same report.
Of course, not horizontally. If you move the controls one under other one you can obtain a report with only 9 "columns". If you put 3 controls on the same vertical you can obtain a report with 6 "columns" and so on.

I have attached a picture from one of my reports where I have 15 columns from database but I display all of them using 5 columns in report.
Hope you understand the idea, because my English is...

I think that you can accomplish the task you are asking for: to select columns to be included in the report. But is a hard work to code that.

Attached Images
File Type: jpg Report.jpg (82.8 KB, 730 views)
Jan 18 '12 #2
dsatino
393 256MB
First, if only to amuse myself, 'microsoftsucks', yet here you are... :)

Now, to answer your question: Yes, but as Mihail suggests it's a bit of work. If you're inexperienced, it's a lot of work.

In general:
1. You need a way for the user to select the columns. The simplest way is probably a list box in which the user can select multiple items. You only have so many controls on your report though so now you must have something in place to ensure the user doesn't select too many.

2. You then need code to dynamically rewrite the recordsource of the report or the query that the report uses as a recordsource. I prefer to use a query because I can view it without having to open the report, but that's up to you.

3. Then you need to code to clear all the controlsources of your report controls and code to rewrite them.


Not terribly complicated, but your level of experience will come into play.
Jan 18 '12 #3

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

Similar topics

11
by: Peter Foti | last post by:
Hi all, I have a form that contains a 2 column table. In the left column is the description for a particular input (ie - "First Name", "Last Name", "Phone Number", etc.). In the right column...
4
by: lea | last post by:
Does anyone know how to write the SELECT * FROM tblename WHERE fldname BETWEEN combobox1.text AND combobox2.text i can't find much source about this query on net,i need to let user select...
9
by: saturnius | last post by:
Hello, I am passing a value to a stored procedure in vb.net to get normally a selection of the table. How could I get the complete table without writing the code twice? Many thanks in advance ....
0
by: Michael Dekson | last post by:
Access 97. I make a report and I want first to see report and then print report without type CONTROL + P. Can I make some button or can I see print button in toolbar meny. Thanks
2
by: azizul khan | last post by:
I will be greatfull if any can help me to make a multi column page layout report in vb code. example : i have 500 idno. in database. i need to print all idno. 4 column in a page of dbreport....
2
by: ChadDiesel | last post by:
Hello, I have a form and subform with their tables linked by a field called Load_ID. I have a button on my subform that prints just the items listed on that particular subform (looking at...
5
by: Tony Dong | last post by:
Hi there, I am newer for dot net I want to make a report and then print it, the report may include images and text, how can I do that, any one can give me a suggestion? I know how to...
10
by: ste | last post by:
Hi there, I'm trying to query a MySQL database (containing image data) and to output the results in a HTML table of 3 columns wide (and however many rows it takes) in order to create a basic...
1
by: abil | last post by:
i've already build a program that contain all the price, the change given back to the customer but i dun have no idea which function i should use to do program print report... #include <cstdlib>...
1
by: John Cazaly | last post by:
I have what wouold at first seem a simple request: to create a datagrid / View or similar for an Orders table with OrdID and OrderDate fields (plus some others). I want to select OrderDaate >= From...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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
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...

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.