Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reports, show certain columns in different page

Status
Not open for further replies.

lanelouna

Programmer
Dec 19, 2002
71
GB
hello All
I hope you can help me on this
i need a simple way to tell the report to go to the next page (horizontally speaking) when he gets to a certain field

in fact assume i have these fields
beg end time chrono set
i want my report to show
beg end time on a page
and chrono set on the next page
how can i specify in the module that the report goes to next page if he finds the field Chrono
thank you in advance

Lina

 
Group the report by your Chrono field. In the group footer set the Force New Page property to After Section.
 
thanks for your quick answer
however, i am sorry i don't know how to use this property (group), and what is its use
if u have an example that would help
i hope you can help me thanks
Lina

 
In design view of your report, click on View | Sorting and Grouping. In the Field/Expression box, select your Chrono field. In the Group Footer box, click Yes.

Back in your report, right click on the grey bar of the Chrono footer in your report and select Properties. On the Format tab, change Force New Page to After Section and you should be all set....

Let me know if this helps...
 
in fact this is a part of my form
knowing that i have around 30 fields
i want the field chrono and every other field that comes after it to be placed on another page (section), and i don't know how to do it
can u help?


Function FDynaReport(i)
Dim db As Database
Set db = CurrentDb

Dim rst As DAO.Recordset

Dim frm1 As Form, Ctl1 As Control, ctl As Control
Dim varItm As Variant
Set frm1 = Forms!Mami
j = 1


Dim rprt As Report

Set rprt = CreateReport(, "Standard")
Dim Idx As Integer
Dim MyName As String
Dim OldName As String

With rprt
.RecordSource = "List" & i & ""
.Caption = "List_" & i & "" & " - Report"
.Section(acDetail).Height = 0
.Section(acHeader).Height = 1000
.Section(acPageHeader).Height = 0
.Section(acPageDetail).Height = 0
.Section(acDetail).CanShrink = True
.Section(acDetail).CanGrow = True

End With
Set rst = db.OpenRecordset("List" & i & " ", dbOpenDynaset)
MyName = "List_" & i & ""

OldName = rprt.Name
Set ctlEtiquetteTitreList = CreateReportControl(rprt.Name, acLabel, acHeader, "", _
"", XEtiquetteTitreList, YEtiquetteTitreList)
With ctlEtiquetteTitreList
.Width = 2500
.Height = 500
.Name = "List" & i & " " & "-TitleEtiquette"
.Caption = "List" & i & " "
.ForeColor = 33023
.FontSize = 22
End With

Idx = 2
While Idx < rst.Fields.Count

Set EtiquetteCtl = CreateReportControl(rprt.Name, acLabel, acPageHeader, &quot;&quot;, _
&quot;&quot;, XEtiquette, YEtiquette)
With EtiquetteCtl
.Height = 300
.Name = rst.Fields(Idx).Name & &quot;_Etiquette&quot;
.Caption = rst.Fields(Idx).Name
.ForeColor = 8388608
.FontBold = True
.TextAlign = 1
.Width = Len(EtiquetteCtl.Caption) * 135
End If
.FontSize = 7
End With
Set ctlText = CreateReportControl(rprt.Name, acTextBox, acDetail, &quot;&quot;, _
&quot;&quot;, XEtiquette, YEtiquette)
With ctlText
.Height = 300
.Name = rst.Fields(Idx).Name
.ControlSource = rst.Fields(Idx).Name
.TextAlign = 1
.CanGrow = True
.CanShrink = True
.FontSize = 7
End With

XEtiquette = XEtiquette + (0.85 * EtiquetteCtl.Width)
Idx = Idx + 1
Wend
DoCmd.Restore
DoCmd.Save
DoCmd.Close
DoCmd.Rename MyName, acReport, OldName

End Function
 
well i tried like u said manually to see if it works
well unfortunately no
thanks anyways for being patient and precise

Lina
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top