473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VFP SET PRINTER TO Functionality

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?

Jan 3 '06 #1
3 1871
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?

"Claude Hebert" <ch*****@rvmags.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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?

Jan 3 '06 #2
Claude Hebert wrote:
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.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt2A.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt3A.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt4A.Doc ument.Pages)

oCombinedReport.Printer.PrinterSettings.Copies = 2
oCombinedReport.Print(False, False)
Jan 3 '06 #3
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" <m@ark.com> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
Claude Hebert wrote:
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.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt2A.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt3A.Doc ument.Pages)
oCombinedReport.Document.Pages.AddRange(oRpt4A.Doc ument.Pages)

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

Jan 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mario | last post by:
Hello, I am a new Python entusiast, I am studing it since some weeks and I think it's a great language and I was very happy with it, but when I came to make a printer routine I really got...
1
by: Jo Claes | last post by:
Hi, We want to make it possible for our Users to link a printer to a document type. Doing that we need to know how we can load the installed printers on the client system and how we can...
2
by: Yong Pong | last post by:
I have some functionality that I am trying to implement and I cannot figure it out. What I am trying to do is make it so that a user goes to a web page, sees a printer, clicks on a hyperlink, and...
3
by: bla | last post by:
Hello all, Does anybody have working sample VBA code to change printerdriver in a report and to get a list of available drivers and there functionality? It is for Access 2000. This version of...
7
by: Isaac | last post by:
Hi, I have been trying to find out, in C programming language, how to send output to a printer. Can anyone help? /Johann
2
by: kids_pro | last post by:
Does any know how can I fit my report to a Receipt Printer (dot matrix)? Is there any special sequence code to control the line? Any namespace provide this functionality? Cheers, Kids
3
by: alan | last post by:
What I am trying to do is installing printers on the end-user machine through a hyperlink Simply user goes to a web page, sees a printer name, clicks on a hyperlink(which is \\servername\printer )...
3
by: Bob | last post by:
I need to create a program that is essentially a special fax sender using multi line Dialogic cards. I figure that the best way to do this so that it can be used from any app is to create someting...
3
by: ypytt | last post by:
Hi all, I'm developing a Windows application in C#. It generates reports using ReportViewer. These reports should be printed on a dot matrix printer. However, there is a problem. The application...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.