borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Printing)Next Topic (Stop the Printer in Last Line) New Topic New Poll Post Reply
AndreaVB Forum : Printing : Numbering data items
Poster Message
honest_dude
Level: Trainee

Registered: 29-07-2005
Posts: 2

icon Numbering data items

I need to give a serial number on my data report printout.  My data is in one table and make queries regarding their region such as east, west, north and south.  I can take the report out for those regions but I need to give serial number on each report for the items.  Anyway I can do this?

Zela


____________________________
Zela

29-07-2005 at 09:36 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Numbering data items

What do you mean by serial number?

____________________________
If you find the answer helpful, please mark this topic as solved.

07-08-2005 at 11:58 PM
View Profile Send Email to User Show All Posts | Quote Reply
honest_dude
Level: Trainee

Registered: 29-07-2005
Posts: 2
icon Re: Numbering data items

My meaning in numbering means -  suppose there are 20 list of data item, and half of them is in one region and another haft in another region.  When I make a report, I want to give this data a serial number like item no. 1, 2, 3, 4, 5,....10 and for another region item no. 1, 2,3,4,...10 This number should go along with the data item on my report form not from the database itselt, since it has go serially and should increase as the item report increases.  And if the report comes together as all region, the serial number should comes to 1 .....20.

I hope I make myself clear, and would be very grateful if there is any help for this.

Thank you.

Zela.


____________________________
Zela

09-08-2005 at 09:10 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Numbering data items

I just saw that you are using data reports, I never used them.... when you insert a recordcount field on the report, try finding an option in the format section (if there is one) that will allow to reset the value on changing the group. THis way when group changes the value will be restared. Sorry, I cant help you more.

____________________________
If you find the answer helpful, please mark this topic as solved.

09-08-2005 at 08:26 PM
View Profile Send Email to User Show All Posts | Quote Reply
KIKI GUNAWAN
Level: Trainee

Registered: 16-08-2005
Posts: 3
icon Re: Numbering data items

try to use seagate cr not data report...  
or try printer.print  

16-08-2005 at 12:13 PM
View Profile Send Email to User Show All Posts | Quote Reply
TJ_01
Level: VB Lord


Registered: 24-08-2005
Posts: 320
icon Re: Numbering data items

hi.

Try to use crystal report in making a complicated reports instead of datareport. Anyway, where are you getting this serial number? Are they reside from the database or just purely coded? if so, you can just simply view this serial code in the datareport by using like this:

With DataReportApp
      .Sections("section4").Controls.Item("label8").Caption = Text1.text
End With


I hope i understand your question.

[Edited by TJ_01 on 24-08-2005 at 07:44 AM GMT]

____________________________
Im JAMES  

24-08-2005 at 07:43 AM
View Profile Send Email to User Show All Posts | Quote Reply
kibzama
Level: Big Cheese


Registered: 05-09-2005
Posts: 28
icon Re: Numbering data items

Am not sure this is the best way, but i think it will work.

In your main table where you use to make the query, add a field say <NewField>
Make it nullable and leave empty for the sole purpose of inserting the serials in the report.

After you open the recordset to generate your report, you can add the serials using code, like this

Dim i as Integer
Dim j as Integer

With rs
  If not .eof
    j=.RecordCount
    .MoveFirst
    for i=1 to j
      rs!NewField=i
      .MoveNext
    next i
  end if
end with

I hope it will help

Good luck

Kibzama


[Edited by kibzama on 06-09-2005 at 02:42 PM GMT]

06-09-2005 at 11:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : Numbering data items
Previous Topic (Printing)Next Topic (Stop the Printer in Last Line) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder