VFP SET PRINTER TO Functionality

C

Claude Hebert

Hello,

I have a need to print several reports (doing them as sub reports is not
an option)

In VFP we use the SET PRINTER commands to basically open the printer,
print several reports, and close the printer to release the whole job as one
job

Can this be done in VB.NET???

Would the CmdStartJob and CmdEndJob be the functions to use?

If so or not, any suggestions on how to implement this?
 
C

Claude Hebert

Just noticed those commands are part of the drives sdk.

Also, we are using Active Reports .NET and VB.NET in VS 2003

Summary:

Scenerio:

We are writing an application used in the Distribution of Printed Materials

In the distribution process, each store getting product can get 1 to 9
reports.

Of those reports, there could be several variations



So, store 1 gets: Report 1a, 2a, 3a, 4a

Store 2: Report 1a, 2b, 3a, 4a, 5a, 6a, 7a, 8a, 9a

Store 3: Report 1f, 2d, etc...

My problem is

1: Out business is customized so we can not standardize the reports

2: We have to print the reports out in order (ie all tre reports for store
1, then store 2, etc...)

3: None of the reporting tools allows enough flexibility to cove the
variation we have

4: We have to have them in order for shipping (so printing groups using the
same reports isnt an option)

5: And we really need it to go as one print job so it comes out in order,
fails as a whole, and doesnt have anyone elses printing showing up in the
middle of the job.

6: works in FoxPro and VFP



ideas?
 
M

Mark

Claude said:
Also, we are using Active Reports .NET and VB.NET in VS 2003


If your using AR.NET, you could create all the reports separately, checking to see if they worked as
you go and then merge them into a single report and print that. This might not be the exact syntax
as I don't have my code to hand, but this is basically how I do the same sort of thing in AR.NET.


Dim oRpt1A as clsReport1A
Dim oRpt2A as clsReport2A
Dim oRpt3A as clsReport3A
Dim oRpt4A as clsReport4A

Dim oCombinedReport As ActiveReport

oRpt1A.Run()
oRpt2A.Run()
oRpt3A.Run()
oRpt4A.Run()

oCombinedReport.Document.Pages.AddRange(oRpt1A.Document.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt2A.Document.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt3A.Document.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt4A.Document.Pages)

oCombinedReport.Printer.PrinterSettings.Copies = 2
oCombinedReport.Print(False, False)
 
C

Claude Hebert

Well, i think i can see how this might work. i would have to loop through
each store and each report adding the generated pages to the combined report
and then printing that one.

ok, i will have to try it out. thanks!



Mark said:
If your using AR.NET, you could create all the reports separately,
checking to see if they worked as
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top