Problem With Dynamic Report

Aug 24, 2005

Hello to all,
I created a dynamic report based on cross tab query, the header is a sub report.
Number of lines and rows depend on the data typed in a form.
Here is my problem. When numbers of rows exceeds for exemple 15 the header and detail line continue on the line below i would like the report continue on another page (see below).

Actualy i have this:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20
line1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
line2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
etc..

I would like this:

page 1:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
line1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
etc...

Page 2:
16 17 18 19 20
line1xxxxxxxxx
line2xxxxxxxxx
etc...

THANKS IN ADVANCE FOR HELP.
VINCENT

View Replies


ADVERTISEMENT

Making A Dynamic Report From My Dynamic Form

Jun 30, 2006

I have a form that shows a list of all of my records in my database. I want to be able to click a button called "Report" and have that print a report that has all the records I have filtered on my form. I have a report in the format that i want it in, however, currently it prints every record and not just what is shown on my form. (The form is dynamic and I want the Report to be dynamically based on the form) HELP PLEASE!

View 6 Replies View Related

Dynamic Crosstab Report

Nov 30, 2004

I am using the following cde to generate a Dynamic Crosstab Report. I can get the column labels to work but Ican't get the values to appear in the detail section all I get is #Name?
I am using the following code in the report

Private Sub Report_Open(Cancel As Integer)
Dim rst As DAO.Recordset
Dim db As DAO.Database
Dim i As Integer
Dim j As Integer
Set db = CurrentDb
Set rst = db.OpenRecordset("select * from test2")
rst.MoveFirst
j = 0
i = 0
For i = 0 To rst.Fields.Count - 1
If rst.Fields(i).NAME Like "*test" Then GoTo skip_it
j = j + 1
Select Case j
Case 0
Me.Field0.ControlSource = rst.Fields(i).NAME
Case 1
Me.Field1.ControlSource = rst.Fields(i).NAME
Case 2
Me.Field2.ControlSource = rst.Fields(i).NAME
Case 3
Me.Field3.ControlSource = rst.Fields(i).NAME
Case 4
Me.Field4.ControlSource = rst.Fields(i).NAME
Case 5
Me.Field5.ControlSource = rst.Fields(i).NAME
Case 6
Me.Field6.ControlSource = rst.Fields(i).NAME
Case 7
Me.Field7.ControlSource = rst.Fields(i).NAME
Case 8
Me.Field8.ControlSource = rst.Fields(i).NAME
Case 9
Me.Field9.ControlSource = rst.Fields(i).NAME
End Select
skip_it:
Next i
rst.Close
Set rst = Nothing
End Sub
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim rst As DAO.Recordset
Dim db As DAO.Database
Dim i As Integer
Dim j As Integer
Set db = CurrentDb
Set rst = db.OpenRecordset("select * from test2")
rst.MoveFirst
j = 0
i = 0
For i = 0 To rst.Fields.Count - 1
If rst.Fields(i).NAME Like "*test" Then GoTo skip_it
j = j + 1
Select Case j
Case 0
Me.Label0.Caption = rst.Fields(1).NAME
Case 1
Me.Label1.Caption = rst.Fields(i).NAME
Case 2
Me.Label2.Caption = rst.Fields(i).NAME
Case 3
Me.Label3.Caption = rst.Fields(i).NAME
Case 4
Me.Label4.Caption = rst.Fields(i).NAME
Case 5
Me.Label5.Caption = rst.Fields(i).NAME
Case 6
Me.Label6.Caption = rst.Fields(i).NAME
Case 7
Me.Label7.Caption = rst.Fields(i).NAME
Case 8
Me.Label8.Caption = rst.Fields(i).NAME
Case 9
Me.Label9.Caption = rst.Fields(i).NAME
End Select
skip_it:
Next
rst.Clone
Set rst = Nothing
End Sub

What else do I need to do to get data in the detail section
In anticipation

errolf

View 5 Replies View Related

Group Data In A Dynamic Report

Jan 6, 2005

Hi guys,



I’m creating a report on which I want to group data base on a field that has two different data one is KEY and OTHER. Now I need to be able to show on the detail section all records base on KEY, and group the rest of the records by OTHER.



Can anyone help me please?



Million of thanks

View 2 Replies View Related

Reports :: Dynamic Crosstab Report

Nov 13, 2014

I have a crosstab Query as the source for my report, of course the issue is the column headings on the report. I have Purchasers as a row heading, Year as a row heading, Month/Year as a row heading, Meter as a column heading, PaidMCF as Value and, a total as a Row heading. My issue is feeding the column headings on my report with the meter names.

Purchaser 1 has 23 meters attached
Purchaser 2 has 1 meter attached
Purchaser 3 has 6 meters attached
Purchaser 4 has 2 meters attached
Purchaser 5 has 16 meters attached
Purchaser 6 has 11 meters attached.

View 4 Replies View Related

Reports :: Getting Sum In Dynamic Cross Tab Report

Jul 28, 2013

I created a dynamic crosstab report with 4 unbound fields in the details section and 4 unbound fields in the header section, which all work perfectly well. The crosstab query contains 17 columns. The last 4 columns contain the values I need to take the sum of. I have put some code in the open event procedure of the report.

Private Sub Report_Open(Cancel As Integer)
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * from Que_ProjectUren_Sel_Dept_Test")

[code]...

View 11 Replies View Related

Reports :: Dynamic Field On A Report?

Jul 3, 2014

I'm currently creating an invoicing report for a company, and for record purposes they need a dynamic field on the report for the specific Invoice Number of each client they invoice. I have the field set up currently as a text box =[Invoice#] so they have to enter an invoice number when they generate the report. However, when I generate the report and put in a number, I'm getting some whacky outputs.

For example, I've tested it with a test client, and when I give the client an invoice number of 1, the report somehow changes it to 49.

View 1 Replies View Related

Modules & VBA :: Building Dynamic Filter For Report?

May 20, 2015

I have a button that opens a report. The code behind the button builds the filter criteria for the report based on some selections in a list box.

Code:
DoCmd.openReport "Report", acViewPreview, "", GetCriteria
For VarItem = 0 To Me.List2.listcount - 1
strCriteria = strCriteria & "([ProjectNo]= '" & Me.List2.Column(1, VarItem) & "' And [ClientID] = " & Me.List2.Column(0, VarItem) & ") Or "
Next VarItem
If strCriteria <> "" Then
strCriteria = Left(strCriteria, Len(strCriteria) - 4)
Else
strCriteria = "True"
End If
GetCriteria = strCriteria

This is what the filter would look like with values after running the report (taken from filter bar in report properties):

([ProjectNo]= '150002' And [ClientID] = 206) Or ([ProjectNo]= '150003' And [ClientID] = 79)

Problem is that i only get records for ([ProjectNo]= '150002' And [ClientID] = 206). I this seems only filter ONE set of criteria ignoring all the others. What am i doing wrong?

View 5 Replies View Related

Modules & VBA :: Generate Dynamic Report From Listboxes?

Jun 6, 2013

Is it possible to generate a report from 2 listboxes?

I have attached a pic of what I am trying to accomplish. I am wanting to have a report open with only the criteria that a user selects from the listboxes.

listbox 1: User selects a case number(s)

listbox 2: User selects the fields they would like in the report

So, if the user selects:

Case number: 13-001

Then selects fields:

Allegation
Incident date
Focus_Last name

This report would be:

Code:
Case Number Allegation Incident Date Focus_Last Name
13-001 DUI 06/01/2013 Doe

View 5 Replies View Related

How To Create Dynamic Report With Changing View

Jun 10, 2014

I have a master recordset containing sales data for numerous products. I'd like to create a dynamic "dashboard" (i.e. a single report or form that the user can interact with dynamically) where the user can click a product name from a ListBox and see a summary report generate in the space below. If they click a different product name from the ListBox, I'd like the report space to automatically refresh and show the next summary report.

I've created my desired report and dragged it into the form but I'm having trouble embedding it dynamically into the form: I tried using the "Link Child Fields"/"Link Master Fields" properties, but get an error message saying I can't build a link between unbound forms. Here's a screenshot what I'm trying to accomplish...

View 7 Replies View Related

Reports :: Crosstab Report With Dynamic Number Of Columns?

Mar 21, 2015

I've made a crosstab query and would like to use it to create a subreport. In the column headers I have names of courses. Courses can be added or removed. How can I make a crosstab report with dynamic columns?

PHP Code:

TRANSFORM Count(tblCourses.CourseName) AS CountOfCourseName
SELECT tblNmscStaff.NmscStaffFirstName, tblNmscStaff.NmscStaffLastName, 
tblNmscStaff.PtOrFtNtl, tblNmscStaff.Ntl, tblNmscStaff.NmscID
FROM tblNmscStaff LEFT JOIN (tblCourses RIGHT JOIN [tblNmscStaff/CoursesPointer] ON 
tblCourses.CourseID = [tblNmscStaff/CoursesPointer].CourseID) ON 
tblNmscStaff.NmscStaffID = [tblNmscStaff/CoursesPointer].NmscStaffID
GROUP BY tblNmscStaff.NmscStaffFirstName, tblNmscStaff.NmscStaffLastName, 
tblNmscStaff.PtOrFtNtl, tblNmscStaff.Ntl, tblNmscStaff.NmscID
PIVOT tblCourses.CourseName; 

View 1 Replies View Related

Reports :: Cross Tab Report Versus Dynamic Columns

Apr 22, 2014

I have made a cross-tab query which works fine. I also have made a report which is based on this cross-tab query. Due to nature of the cross-tab query the Value column(s) is dynamic. The report I made is based on all available data types (columns). The report works if all data type is available but the report fails if some of the data types are not available (i.e columns are missing due to not having any value or data). I hope I am explaining this correctly,

Is there a way I can use expressions in the report to place a conditional clause that if the Control Source doesn't exist place a Null or 0 in the report or in its place.

View 2 Replies View Related

Updating Embedded Report Using Dynamic Created SQL Statement

May 19, 2015

I have created a database and have a form (searchpartsfrm) with multiple combo boxes and a text box that builds up all the entries and creates a perfect SQL statement and stores this in strisql variable.

I have a report (showallpartsrpt) embedded on the page that is currently showing every record in the database.

Is there anyway to have this form "refresh" and show only the results of the query by clicking a "search" button?

I believe I need to use the filter command somehow but im not sure how to reference the embedded form. If I try with some test code it cannot locate showallpartsrpt.

View 4 Replies View Related

Modules & VBA :: Type Mismatch Report On-Open For Dynamic Crosstab

Nov 22, 2014

This code runs to the set frm part then i get a type mismatch? ive tried a few different things and still nothing?

Code:

Private Sub Report_Open(Cancel As Integer)
' Create underlying recordset for report using criteria entered in
' EmployeeSalesDialogBox form.
Dim intX As Integer
Dim qdf As QueryDef
Dim frm As Form
' Set database variable to current database.
Set dbsReport = CurrentDb

[code]....

View 2 Replies View Related

Modules & VBA :: Dynamic Button Function And Single Field Report

Jun 25, 2013

I'm still learning Access 2010 and having issues getting my buttons to work. I'm working on a simple address database.edit/save button. On form load, my fields are locked and my button will read "edit". After clicking, my fields are unlocked, my search features are locked, and my button reads "save" just how I need it to. The issue happens when I try and save the field edits, lock fields, return search features, and get button to read "edit" again. I know I need to add some code into what I already have, but I'm running into a wall as I have tried many options to get it to work. Here is the code for this button:

Code:
Private Function Lockdown() 'locks controls at load
Dim tb As Control
Dim cb As Control
Dim subf As Control

[code]...

Second issue is with my report button. I have not been able to get this to work once. I have done many searches on single record reports, and have found the same code every time. I added that code into my database, but can't seem to get it to work. In my database there are two address (shipping and work location) which I would like to print out together. I have the work location on the main form and the shipping on a subform. There are and upwards of 150 locations I will have in my database, Here is the code I'm working with:

Code:
Private Sub cmdrptadd_Click()
Dim strReportName As String
Dim strCriteria As String

[code]...

View 3 Replies View Related

How To Get Dynamic Sum

Aug 25, 2006

Hey,
I made a table Products: order number (key), name, supplier, price,...
I copied it into a query, and made a form of it, so I can look up products by order number with a combo-box. Now I'm into my next step (and it gives me a headache):
In the form I added a new text box, where I should put the incoming amount of a product in, and another text box to put in the products that are empty.
Now the question: how can I make a query that counts the amounts of incoming and empty products, as well as the difference between those two, in a way I can do multiple additions?
I hope you know what I mean by dynamic sum: start stock=0 first delivery: +3==> stock 3 +next delivery: +6 ==> stock 9,...

If anyone has some idea...
Thanx in advance

Kev

View 1 Replies View Related

VBA Dynamic Forms

Oct 8, 2006

Hi guys, I am trying to create a form or subform that should be created after a button is pressed and some complex filetering is occured and records are saved in a multiple arrays so I need to generate a form and controls according to those array values. Please help.

Actually I can not get data directly out of the query its just too complex bla bla bla. Finally I have three arrays each array has same number of values and I want to generate a form on the basis of the values of the array. Please Help me. I have tried creating form but Could someone please show me the right path.

many thanks

View 1 Replies View Related

'Dynamic' Selection

Oct 12, 2006

Now, I don't know if this topic should be in forms, queries or reports, so I decided to post it here in general until someone gives me a big bollocking and send this topic elswhere :D

I have a table with loads (50+) of columns which hold information about people in our company.
What I want is a form? that allows me to tick the information I want and then displays the result in a report.
So, today I want a list with Name, address, town and phonenumber, but tomorrow I might need a list with Name, phonenumber, passport number and expire date.
In short, I need to make a 'dynamic'? report that displays the options I ticked out of the 50+ options (does this make sense?).
I searched for it but no luck so far.
Ta in advance

View 4 Replies View Related

Dynamic Arrays

Jan 24, 2008

Hi,

How can I determine the length (size) of a dynamic array so I can iterate over it?

Thanks,
Mike

View 2 Replies View Related

Dynamic Listboxes

Jul 17, 2005

Hello,

I have two tables: Categories and Subcategories.

Categories contains one field: CategoryName
Subcategories contains two fields: ParentCategoryName and SubcategoryName.

In a third talbe I want to select a category from a listbox, then have the subcategory listbox update automatically with the possiblities. Is this possible?

Thanks.

View 1 Replies View Related

Dynamic Numbers

Jul 14, 2007

Not sure that this fits under table but I believe that is the root of the solution, so we'll try it here.

I'm building a database to simplify the process of creating a PC build sheet for my company. I would like it to track pricing and everything as well so here is where the problem comes in:

Say right now a floppy drive costs our customer 10 dollars. In a few months, we could still be using the exact same floppy drive, but the price has dropped to 9 dollars. If I run a report to display all computers sold in the past year (including pricing), I want the floppy to have the price that the customer paid at the time; not the latest 9 dollar price only.

Correct me if I'm wrong, but here is my thinking:
I could run a macro to rename the $10 floppy drives and update it in all old records (though I have a feeling I'd have to pull a trick out to mess with UIDs) then update the price on it for the list of options when building out a computer, but it seems like I should be able to automate this better.

Possibly some sort of linkage table?

I'm just trying to keep this as clean as possible so I'm not digging back through this a year down the road.

View 3 Replies View Related

Dynamic Queries

Mar 3, 2006

i have a database that imports files with dynamic amounts of fields, runs querys on the data and outputs it to a speadsheet. The The problem is instead of making it run querys on each column, i have it running on them all collectively. Now i want to change it so a query is run on each column then output to its own spreadsheet. Does anyone know how to do this?

View 1 Replies View Related

Dynamic Query Help

Feb 7, 2007

I have a form where a user chooses different criteria from listboxes and then I run out and format the SQL statement.

This is the query that I am trying to replicate using VBA code. Note: the Location_ID, Ship_Day, and Final_Dest come from the values in the listboxes.

I am getting a syntax error and I cannot find it anywhere. Also, is there an easier way to do this?


SELECT [(Table) Denton Routing].LOCATION_ID
, [(Table) Location].NAME
, [(Table) Location].CITY
, [(Table) Location].STATE
, [(Table) Location].REGION
, [(Table) Denton Routing].UNIQUE_LANE_ID
, [(Table) Denton Routing].CARRIER_ID
, [(Table) Denton Routing].[SHIP DAY]
, [(Table) Denton Routing].[DELIVERY DAY]
, [(Table) Denton Routing].[TIME AT LOCATION]
, [(Table) Denton Routing].STOP_NUM
, [(Table) Denton Routing].NO_OFF_STOPS
FROM [(Table) Location] INNER JOIN [(Table) Denton Routing] ON [(Table) Location].[LOCATION ID] = [(Table) Denton Routing].LOCATION_ID
WHERE ((([(Table) Denton Routing].UNIQUE_LANE_ID) In (SELECT UNIQUE_LANE_ID
FROM [(Table) Denton Routing]
Where [(Table) Denton Routing].Location_ID = "13176AA"))
AND (([(Table) Denton Routing].[SHIP DAY])="MONDAY"
AND [(Table) Denton Routing].Final_Dest = "DENTON"));

Here's the code:

Private Sub cmdRunQuery_Click()

Dim Db As DAO.Database
Dim QD As QueryDef
Dim where As Variant

Set Db = CurrentDb()

' Delete the existing dynamic query; trap the error if the query does
' not exist.
'On Error Resume Next
'Db.QueryDefs.Delete ("Dynamic_Query")
'On Error GoTo 0

where = Null
where = "WHERE ((([(Table) Denton Routing].UNIQUE_LANE_ID) In (SELECT UNIQUE_LANE_ID FROM [(Table) Denton Routing] where"
where = where & " [(Table) Denton Routing].[Location_ID]= '" + Me![Text35] + "'"
where = where & " AND [(Table) Denton Routing].[Final_Dest]= '" + Me![List29] + "'"
where = where & " AND [(Table) Denton Routing].[Ship Day]= '" + Me![Combo46] + "'))"

MsgBox (where)

Set QD = Db.CreateQueryDef("Dynamic_Query", _
"Select SELECT [(Table) Denton Routing].LOCATION_ID, [(Table) Location].NAME, [(Table) Location].CITY, [(Table) Location].STATE, " & _
" [(Table) Location].REGION, [(Table) Denton Routing].UNIQUE_LANE_ID, [(Table) Denton Routing].CARRIER_ID, [(Table) Denton Routing].[SHIP DAY], " & _
" [(Table) Denton Routing].[DELIVERY DAY], [(Table) Denton Routing].[TIME AT LOCATION], [(Table) Denton Routing].STOP_NUM, " & _
" [(Table) Denton Routing].NO_OFF_STOPS FROM [(Table) Location] INNER JOIN [(Table) Denton Routing] ON [(Table) Location].[LOCATION ID] = " & _
" [(Table) Denton Routing].LOCATION_ID " & (" where " + Mid(where, 6) & ";"))

DoCmd.OpenQuery "Dynamic_Query"

End Sub

View 5 Replies View Related

Dynamic Sorting...

Oct 19, 2007

Say I have 3 fields in my table: FstName, MidName, LstName.

I want to be able to dynamically change the sort order of a query to different sort orders using the same fields via a form.

I may want to see the records sorted by LstName, MidName, Fstname; and another time see the list sorted by Fstname, Lstname, MidName; and other times by any combinations possible using the 3 fields.

I see 3 options: filter by form; programatically change the SQL Order By clause; or concatenating the table fields together in the desired order via a custom function and sorting by the function result.

Is there any difference in query/form performance between the 3 options?

View 3 Replies View Related

Dynamic Look Up Problem

Feb 25, 2005

NEW PROBLEM! :)

Sorry for the double post.

View 2 Replies View Related

Dynamic Subform

Apr 14, 2005

Hi all, I'm currently strugging with an Access problem and wondered if anyone here could give me some ideas. This is fairly complicated to explain, so please bear with me!

Basically, I have a query that pulls out a list of users, and another query that pulls out of a list of possible applications that that may be assigned to them.

What I need to do is present this in a form, so that my app user can browse through the list of users, and assign/deassign applications to that user. I'm thinking of presenting this along the lines of a list of users down the left of the screen, a list of apps along the top of the screen, and a checkbox for each app/user combination.

The complication is the list of possible applications is different every time the form is loaded. There are 1500 possible apps, and ANY combination of these may be available.

My most recent attempt at this was to find the list of apps, and then (using vba) create a temporary table, with a "User id" field, and then a "yes/no" field for each app that is available to this group of users. I can then present this in a subform, allowing the tickboxes to be viewed and modified for each user/app combination.

However, my problem is that when I dynamically try to alter the recordSource of the subform, the field names are different each time, so it doesn't display the app names I need. I've searched Google etc, and the only relevant suggestion is to have multiple subforms, and display the one that suits. However, with such a huge number of possible combinations of apps, I cannot take this approach.

So, is there any way that I can easily update the subform to have the correct columns? Or am I going about this in entirely the wrong way?

Any suggestions will be gratefully received - I'm hitting a brick wall with this at the moment and don't have much hair left to pull out!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved