Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2004-04-04
Medium Priority
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
Question by:tariqanis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
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?

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

Author Comment

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  ....

LVL 75

Accepted Solution

Anthony Perkins earned 200 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:

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.

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:

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.


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


Author Comment

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


Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 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