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!

page total in data report 1.

Status
Not open for further replies.

kalpsv

Programmer
Jun 12, 2002
58
IN
page total in data report



1.i would like to have page total in a report of 6 pages
i am using vb 6 enterprise edition and data report
of vb 6.
2. i would like to have even the month of generation of report printed on top of the report on the first page.
for both i use only vb 6 and data reports
can you help me

 
Use RptLabel Control. Change the caption as %p for number of pages and %P for total number of pages.
 
%p will give the page no.
i want a total of the data at the end of each page

and also month and year at the beginning of the report

thank you in advance
 
To do date in the report header, just right click in the header and select 'Insert Control|Current Date'

To do Total at the bottom, right click in the footer area and select 'Insert Control|Function'

This gives a rptFunction control. The properties box allows you to set aggregate function type and datafield to operate on.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
msg for johnwm
thank you for your help
1.i got the current date
can you help me out further
if i generate the report for december
on a future date can i get the date
on the report as december instead
of the current date. is there any
option for the same
2. regarding page total the insert control|function
is not allowed to be selected in page footer
and hence page total is not calculated.
please help me and thanks in advance

 
1. Go to header section. Rightclick|Insert Control|Label. Rename the label (in Properties window) to lblDate. In code before calling dr1.Show use:
Code:
dr1.Section(1).Controls.Item("lblDate").Caption = "Any String  You Want"

2. Sorry I missed Page total - can't help you there!
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
johnwm
thank you for your help
but it doesnot work
you have given the following solution

dr1.Section(1).Controls.Item("lblDate").Caption = "Any String You Want"

i created a rptlbl as name = lbldate and left the caption
col blank is the properties window.
after that i typed the above lines in the .frm file.
upto
dr1.sections(1).controls.item("lbldate") it was giving a tool tip but for caption it was not giving a tool tip.

you have also informed to use "Any string you want"
I have a variable called l_month (combo_box) and a
l_year(vscroll value)
can i use the above in the place any string you want
i hope i am clear

bye and thank you in advance
 
You won't get a tooltip because Intellisense can't see what sort of control you are pointing to.

You can stick a string variable in place of the literal string:
dr1.Section(1).Controls.Item("lblDate").Caption = strMyText

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top