Data report

how to make second page if conditiion was satisfied

Page 1 of 1

3 Replies - 3850 Views - Last Post: 19 May 2009 - 04:39 PM Rate Topic: -----

#1 fernan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-May 09

Data report

Posted 18 May 2009 - 12:36 PM

Hello to everyone.. I am using Visual Basic 6.0 and was crating a data report. Here is the situation,

I have to provide a truck waybill and print it using data report.
the data the I need to see in the report is ready in the form "Creating Comercial Invoice" where my data report gets the details in the "Truck waybill" data report.

Now, My Invoice form displays the qty ordered and if the Qty ordered is greater than 2 trucks then I need to print the Truck way bill in two pages showing in each page one truck.

I already have the report but it shows 2 trucks and will probably print 1 page only of truck waybill stating 2 trucks instead of one.

any help will be much appriciated.

Fernan :)

Is This A Good Question/Topic? 0
  • +

Replies To: Data report

#2 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Data report

Posted 18 May 2009 - 11:50 PM

Am not familiar with reporting in VB6, just Access. In Access you can set grouping and sort records, with new page for next group. In your case, the trucks would each be a group. Anything like that in VB6 report?

This post has been edited by June7: 18 May 2009 - 11:50 PM

Was This Post Helpful? 0
  • +
  • -

#3 fernan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-May 09

Re: Data report

Posted 19 May 2009 - 01:18 PM

View PostJune7, on 18 May, 2009 - 10:50 PM, said:

Am not familiar with reporting in VB6, just Access. In Access you can set grouping and sort records, with new page for next group. In your case, the trucks would each be a group. Anything like that in VB6 report?



Hi..thanks for the reply.. well thats what I am trying to find out since this is my first time using data report in vb6.
if the qty ordered is more than 24.74 MT then Ill be needing to have another page to print the second truck waybill. it should be detected automatically by the program.

It could be like this. when the qty ordered = 49.5 then.. the data report should should print twice carrying 24.74MT each because the truck can only load 24.75 MT.

Fernan
Was This Post Helpful? 0
  • +
  • -

#4 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Data report

Posted 19 May 2009 - 04:39 PM

Is the invoice one report object and the waybill another? If so, print the invoice then determine in code how many prints of waybill needed, something like:
intPages = int(qty / 24.75) + iif(qty mod 24.75 = 0, 0, 1)
For i = 1 to intPages
  'code to print waybill
Next
If the invoice and waybill are one report object, then should be able to use code to reprint only page 2.

This post has been edited by June7: 19 May 2009 - 05:02 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1