If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to Create Auto Bill number in Data Report

Dear Friends & Buddies,

I have a Bill Receipt designed in DataReport, the other Fields are & could be placed in the report without any problems
But I can not place the Bill number in the Page header section..
Please help
Thanking you
Rahul

Re: How to Create Auto Bill number in Data Report

Set the data through code.

I do not use the Vb data report. I use Active Reports instead but I think the Vb Data Report supports some of the same methods.

In Active reports I would simply have a label on the header. AR has an event named format header. In this event I would set the caption of that label to the number I want on the report and that is what will print.

Re: How to Create Auto Bill number in Data Report

Thank you Dglienna,
Thank you very much for the guide lines.
One more question:
My Stock Datareport contains 4313 pages, when I click show Stock It shows only 1 (First) page there are no navigation controls or anything,but when I save It shows 4313 pages saved in .html format & literally there are all the pages showing.My question is how do I see the remaining pages of Datareport when the DataReport is displayed on the Screen?

Re: How to Create Auto Bill number in Data Report

Easiest way is to save it automatically, then OPEN the html report! I don't use Data Reader. I created that file, and it prints out as many pages as are necessary. There are three OTHER reports in that program. VB6 doesn't make it easy to create reports.

Re: How to Create Auto Bill number in Data Report

Dear dglienna,

1)I tried your options to put a label in Datareport & control it through code, It miserably failed !!! a Message appeared you can not insert an automated object in this section.
2) My program while trying to save data says " Out of Stack space" !!! what is the meaning of this.
Please Help
Thanks
Rahul

Re: How to Create Auto Bill number in Data Report

I had a look at the report tool in vb to see what it supports compared to the one I use. I'm glad I do not have to use it. I created a new report added a label to the page header and then clicked on the page header to get the code window and checked what events were available. By default it goes to report error event. If I do the same thign with Active Reports by default it creates a stub for PageHeaderFormat, there are also events for BeforePrint and AfterPrint which can be used. So in active reports it is as simple as

Code:

Private Sub PageHeader_Format()
Label1.Caption = MyReportID
End Sub

These events are available for every section of a report and allows you to modify any data, font, color as you like all through code just like if you were working with a VB Form object.

I've switched to this tool back in VB5 from Crystal and fell in love with it the first day I used it so until now I had never looked at the VB report tool. Unfortunately Active Reports is a bit pricey but if you do a lot of coding that needs to create reports it is worth every penny and then some.

Re: How to Create Auto Bill number in Data Report

Originally Posted by DataMiser

I had a look at the report tool in vb to see what it supports compared to the one I use. I'm glad I do not have to use it. I created a new report added a label to the page header and then clicked on the page header to get the code window and checked what events were available. By default it goes to report error event. If I do the same thign with Active Reports by default it creates a stub for PageHeaderFormat, there are also events for BeforePrint and AfterPrint which can be used. So in active reports it is as simple as

Code:

Private Sub PageHeader_Format()
Label1.Caption = MyReportID
End Sub

These events are available for every section of a report and allows you to modify any data, font, color as you like all through code just like if you were working with a VB Form object.

I've switched to this tool back in VB5 from Crystal and fell in love with it the first day I used it so until now I had never looked at the VB report tool. Unfortunately Active Reports is a bit pricey but if you do a lot of coding that needs to create reports it is worth every penny and then some.

Re: How to Create Auto Bill number in Data Report

You should have noticed that I said that was the code that would work in Active Reports. To the best of my knowledge VB report tool has no such event.

The error you got is not related to the code I posted. It is telling you that you can not place a text box in that area. You will notice that I used a label in my code but again that code would not execute in Vb report tool due to the lack of the required event.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.