Serial Number in VB Data Report

280 pts.
Tags:
VB
VB Data Report
Visual Basic
How can insert a Serial Number in the datareport eg Srl No Rank Name Dept 1 RM T N THAKUR RLY 2 GM T S SINGH RLY 3 INSPR K K PANDEY RLY the data Filtered by RLY from a table and matched only 3 records
ASKED: November 28, 2008  9:37 AM
UPDATED: July 28, 2011  5:59 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know of a way to do that automatically.

You might need to use a recordset as a source, and programmatically add the serial number to each record before binding the recordset to the datareport.
*******************************
from SBElectric
One simple option will be:
Go to Report design mode:
1) Create and insert a Text box with Label name as: Srl (short for serial number – like you have indicated).
2) Open the Property Sheet for the Text box – name it as txtSerialNum
3) On Control Source row: enter =1
4) Scroll down the property sheet – For Running Sum: select Over Group (from drop down list)

This will provide the report with a sequential number 1, 2, 3 etc.

When you change the underlying query for the Report to: say “Air Line” – the same report will provide sequential number for Air Lines.

You may use the same concept to provide the Total number of records for Rly.
Just create another Text Box – under Report Footer. Enter =Count([Dept]) on Control Source row.
I just tested in on Access 2007 – works fine.
Good luck .

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Sudeepcalicut
    I can't find control source row I am using DAO and VB6, Acceess 1) how can I print serial no 2) How can I print the report as in the order of the report 3) How can I sort it
    10 pointsBadges:
    report
  • 15dec121963
    I insert the text box on data report for serial number but did not found source row on properties windows
    35 pointsBadges:
    report
  • AnandaDebnath
    [...] Serial number in VB data report [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following