473,469 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to create dynamic report pending on user parameter

132 New Member
Hi, I hope someone could help me on this, I have a query of several fields from which I want to create report of few fields selected by user. Say total fields be 30 as Field1...Field30, The first three fields will be displayed on the reports but only one of the rest fields (Field4...30) will be available depending on the user request. The User will be prompted to enter one field only to view the report. This report should be displayed on the same template
Aug 29 '10 #1

✓ answered by liimra

You are welcome. I wanted to test the result using all 27 fields. Unfortunately, when using the IIF statement for 19 times, you will probably get "complex expression" error. That is why you create two fields in the Query (each will handle part of the 27 fields); Then you concatenate both fields in another field which will be displaying the extra field based on the user's choice.

Kindly note what I just stated in the attached database.

Regards,
Ali

5 3219
liimra
119 New Member
You can use conditional formatting. It should do it for you. Suppose you have a form called "SeA", and you have a Combo Box called "Cmbo" from which the user will select the fourth field he/she wants. In the fourth field of the Query-Report (DesignView), you can use the following:
Expand|Select|Wrap|Line Numbers
  1.  FourthField: IIf([Forms]![SeA]![Cmbo] = "Catg1",[Field1], IIf([Forms]![SeA]![Cmbo] = "Catg2",[Field2],IIf([Forms]![SeA]![Cmbo] = "Catg3",[Field3],IIf([Forms]![SeA]![Cmbo] = "Catg4",[Field4],""))))

The above applies for 4 fields. Use same method for the 27 fields and you are done.

Regards,
Ali
Aug 29 '10 #2
Mr Key
132 New Member
Thankx alot Liimra! I have tried to implement your Idea by Creating a query that have three Fields and tried to enter the Expression "ForthField" in the ForthFied of a myquery named "Query1" and Run this query, but it displays only the first entered three fields and the ForthFied is empty, may be because of the following reasons:
1. The terms "Catg1", "Catg2","Catg3","Catg4" is not well understood and not defined in my IIfs expression
2. The Combobox, Selects one records from all fields and by default its Unbound
Due to these reasons:
(a)How am I going to set values to these "Catg1", "Catg2","Catg3","Catg4"?
(b)Should I Bound this Combobox to something as?
Sep 4 '10 #3
Mr Key
132 New Member
I have also tried to inlude CheckBox to decide on the column it couldn't work
Sep 4 '10 #4
liimra
119 New Member
You are welcome. I wanted to test the result using all 27 fields. Unfortunately, when using the IIF statement for 19 times, you will probably get "complex expression" error. That is why you create two fields in the Query (each will handle part of the 27 fields); Then you concatenate both fields in another field which will be displaying the extra field based on the user's choice.

Kindly note what I just stated in the attached database.

Regards,
Ali
Attached Files
File Type: zip 30.zip (26.9 KB, 205 views)
Sep 5 '10 #5
Mr Key
132 New Member
Thankx Mr Ali, It sounds like miracle to me, I have been working for it for months now without any solution. This is what I was looking for. Thankx
Sep 6 '10 #6

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

Similar topics

3
by: Climber | last post by:
Hello, I want to now how to do a dynamic report with Crystal Report (C# .Net), the number of colum and row are different each time because they depend of my data base. Thanks Climber
0
by: Benny | last post by:
Hello Experts, Currently Im working on a web application using asp.net with C#. I need to create a report depends on user's selection of the database fields, i.e. the user may want to display...
1
by: saratogajoe | last post by:
User will make choices from multiple drop-down lists of variables with the capability of making more than one choice from each list. Can this be done without using vb or sql. If not, what would be...
6
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main...
6
by: Peter Herath | last post by:
I want to create a dynamic report using a crosstab query...... pls someone look into my attached example database and help me out to do the report generation.... example is like dis...: there...
2
by: zoro25 | last post by:
Hi, I want to create a dynamic report and for that I'm using a very simple Combo Box (only one item) and I want to use this filter on my report. Here's the code I came up with: Private Sub...
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,...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
1
by: remya1000 | last post by:
i'm using VB.net 2003 application program. i'm trying to convert a VB6 program to VB.NET. The VB6 code i'm trying to convert is shown below. declared g_Share() array in module and trying to add...
1
by: Sundhas | last post by:
Hey! I am working on jrxml to create dynamic re0ports. I have parameterized the columns i.e. the jrxml for that report can be used to generate other reports as well. However, i have not managed...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.