469,090 Members | 1,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

serial number in data report

i am retrieving 10 records out of 50 records from the access database using dataenvironment based on some condition. Now i want to place the serial number in the data report. Please give ur suggestions.
Thanks in advance

indra.G
Dec 9 '06 #1
9 8009
Killer42
8,435 Expert 8TB
i am retrieving 10 records out of 50 records from the access database using dataenvironment based on some condition. Now i want to place the serial number in the data report. Please give ur suggestions.
I think we need more information about the situation. For example, what are you referring to as "serial number" here? Is this a field in your database?

And what environment are you working in? VB6? VB.Net? VBA in Access?
Dec 10 '06 #2
I think we need more information about the situation. For example, what are you referring to as "serial number" here? Is this a field in your database?

And what environment are you working in? VB6? VB.Net? VBA in Access?
Sir,
I have created a database in access and iam using vb as front end. For the data report the data source is dataenvironment.For e.g I have nearly 100 records and i am selecting few records based on a condition in the dataenvironment sql command(select * from contract where vtcno>?) and placing the dataenvironment as the data source to the data reort. The selected records should be numbered(1,2,3...) in the data report by adding an additional field in the data report.
thnaks
indra
Dec 11 '06 #3
Killer42
8,435 Expert 8TB
Sir,
I have created a database in access and iam using vb as front end. For the data report the data source is dataenvironment.For e.g I have nearly 100 records and i am selecting few records based on a condition in the dataenvironment sql command(select * from contract where vtcno>?) and placing the dataenvironment as the data source to the data reort. The selected records should be numbered(1,2,3...) in the data report by adding an additional field in the data report.
thnaks
indra
Ah! So you want a simple sequential "record number" on the report.

I'll have to check with some experts who know more SQL than I do, to see whether there's a way to generate it in the query. Will get back to you on that.

If this is going through VB one record at a time, then you could just increment a counter variable and include that.
Dec 11 '06 #4
NeoPa
32,159 Expert Mod 16PB
Create an unbound TextBox in the report with
Expand|Select|Wrap|Line Numbers
  1. Control Source = "=1" (Lose quotes)
  2. Running Sum = Over All
Dec 11 '06 #5
Create an unbound TextBox in the report with
Expand|Select|Wrap|Line Numbers
  1. Control Source = "=1" (Lose quotes)
  2. Running Sum = Over All
sir,
ican't understand.please tell me where to place. iam getting an error end of statement.
thanks
indra
Dec 12 '06 #6
MMcCarthy
14,534 Expert Mod 8TB
Create an unbound TextBox in the report with
Expand|Select|Wrap|Line Numbers
  1. Control Source = "=1" (Lose quotes)
  2. Running Sum = Over All
Adrian

Indra is using a VB front end.

Mary
Dec 12 '06 #7
NeoPa
32,159 Expert Mod 16PB
Adrian

Indra is using a VB front end.

Mary
But they refer to a report.
I don't use VB as a front end myself so am unaware of which features are unavailable.
I know I could use an Access report if I were controlling this remotely from an Excel front end (using the Access library).

If that's not appropriate then please ignore my post Indra.
Dec 12 '06 #8
AricC
1,892 Expert 1GB
In your for/while loop add something like intIndex += 1 that will increment the value each time you move through a record. By data report are you using Crystal Reports? Also, didn't see what version of VB you are using. Post what code you have if this doesn't help.
Dec 12 '06 #9
In your for/while loop add something like intIndex += 1 that will increment the value each time you move through a record. By data report are you using Crystal Reports? Also, didn't see what version of VB you are using. Post what code you have if this doesn't help.
iam using vb6. data report connected using data environment.(not crystal report).
Dec 12 '06 #10

Post your reply

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

Similar topics

15 posts views Thread by tom | last post: by
3 posts views Thread by Bayazee | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.