Solved

Inserting a text box in a data report to display a running number

Posted on 2004-04-04
4
345 Views
Last Modified: 2006-11-17
Hi.... Can any one tell me how to make a text box in a data report (not connected to a source) display a running incremental number... all I need is for the box to display the number 1 in the first row and 2 in the second row and 3 for the third row ...etc.. Thanks
0
Comment
Question by:tariqanis
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 10752512
In order to use the Data Report you will need to "connect" it to your source.  There are several ways to this, but it would depend on your database.  For example, in SQL Server you could use a temporary table with an IDENTITY column.

Give us more details and we can probably elaborate.

Also, please maintain your old open questions:
1 01/25/2004 125 Selecting several rows in combo box  Open Databases
2 02/07/2004 200 Filtering Access records using the filte...  Open Visual Basic

And re-read the EE Guidelines on grading:
What's the right grade to give?
http://www.experts-exchange.com/help.jsp#hi73

For the record:
Questions Asked 19
Questions Open 5
Questions Graded: 12
Questions Deleted: 2
Last 10 Grades Given: C B B B B B A B B B
0
 

Author Comment

by:tariqanis
ID: 10753074
Hi acperkins... I use an Access database in my application.. each text box in the report is bound to a field in the used table, however there is one unbound textbox in the report and my question should have really been: Can I use an unbound textbox, and, if so, does the data report designer provide tools to enable an unbound textbox to run an incremental number like 1,2,3,4 ...?

As for my grading, I am not sure what I am doing wrong. I base my grades on the importance I give to my question.. however, I will read the EE guidelines..

And as for the  open questions I was only aware of one (dated 01/25/2004 ) which I felt did not generate a satisfactory answer, and was not sure what to do .... my impression was one should leave the question posted for a possible satisfactory response... if there are deadlines or other rules in this regard please advise  ....






 
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 10753148
>>Can I use an unbound textbox, and, if so, does the data report designer provide tools to enable an unbound textbox to run an incremental number like 1,2,3,4 ...?<<
Nope.  One workaround is to add the data from your recordset to a new recordset that has the same structure with the addition of an autonumber column.  You can then bind this autonumber column to the report.

>>I base my grades on the importance I give to my question..<<
I suspect you mean you base the points on the importance of the question.  The grade is based on the solution provided.  In particular take a look at this thread which you "awarded" a "C" grade:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20928941.html

Accepted Answer from ampapa
Date: 03/23/2004 10:30AM CST
 Accepted Answer  

There is a Crystal reporting control that you can add to your program. Look in your install cd in Tools\vb\crysrept I think you have to run the setup and then the control is available.

Ampapa,
 
Comment from tariqanis
Date: 03/24/2004 12:59AM CST
 Author Comment  

Thanks amppa.... found it on disk 3 of the MSDN disks, installed and doing well with it.... it was under Common\Tools\VB\CRYSREPT..... thanks again

And then take a look at the EE Guidelines:

<quote>
Although we use an A-D scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete - ask for clarification or details before accepting the answer and grading it. People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. Keep in mind, your question and any follow-up comments should be focused so that there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support. It's also true that a "C" is the lowest grade you can give, and the Experts know that -- so use it judiciously.

</quote>

>>if there are deadlines or other rules in this regard please advise  .... <<
Yes there are deadlines.  Questions are considered technically abandoned after 21 days.

0
 

Author Comment

by:tariqanis
ID: 10753376
Problem solved, thanks.....

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now