ActiveReports for .NET 3.0 Support

Started by thinkjohn at 06-19-2009 2:21 PM. Topic has 5 replies.

Print Search Rate
Sort Posts:    
   06-19-2009, 2:21 PM
thinkjohn is not online. Last active: 4/9/2009 10:35:35 PM thinkjohn

Not Ranked
Joined on 08-31-2004
Secaucus
Posts 14
Generating Report is very slow with new print server
I have a report that is 1 page for each detail record. I am testing with 30 selected records, so it is 30 1 page reports combined and then displayed in the viewer.

With our old print server and driver it took about 4-5 seconds to generate the reports, combine, and open the viewer.

With the new print server and driver it takes about 60-80 seconds to generate the reports, combine, and open the viewer.

I have both printers added to my machine and all I do to test is change which one is the default printer.

The old print server was an HP appliance where the drivers were stored locally on each machine. The new print server is a microsoft print server where the drivers are stored on the server.

I can't believe the way the print server is configured would affect the performance this drastically. Is there anyone who can provide some insight into how I can get this back to a reasonable amount of time?

   Report 
   06-22-2009, 6:35 AM
SankalpS is not online. Last active: 2/8/2010 7:07:01 PM SankalpS

Top 25 Posts
Joined on 12-11-2008
Posts 632

DDStaff
Re: Generating Report is very slow with new print server
ThinkJohn,

I would like to tell you that it would definitely take less time to generate the reports, combine, and open the viewer if the print server drivers are stored locally against the print drivers being stored on the server.

Could you please let us know the build of Active Reports for .NET 3.0 you are using currently and provide some more information about the environment, in which your reports are running?

Regards,
Sankalp
Sankalp Sen
GrapeCity- DataDynamics
   Report 
   06-22-2009, 7:51 AM
thinkjohn is not online. Last active: 4/9/2009 10:35:35 PM thinkjohn

Not Ranked
Joined on 08-31-2004
Secaucus
Posts 14
Re: Generating Report is very slow with new print server
I am in production with version 5.2.835.1.

I just tested with version 5.2.1236.1 and it is still a problem.

I don't think I have any control where the drivers are installed. This is all handled by the print server. Is there a setting I can change to tell the print server where to store the drivers?

   Report 
   06-23-2009, 6:28 AM
SankalpS is not online. Last active: 2/8/2010 7:07:01 PM SankalpS

Top 25 Posts
Joined on 12-11-2008
Posts 632

DDStaff
Re: Generating Report is very slow with new print server

Attachment: PrintingTest.zip
Thinkjohn,

You may want to use the virtual printer and this should decrease the time to print the reports. The reason why it is taking more time is because the drivers are not stored locally as it takes a longer time to access the drivers and get the report ready for printing.

When using the virtual printer you assign an empty string as the PrinterName and this is result gives you faster results as the machine does not have to look for the drivers over the network. However, when using a virtual printer you need to have the print dialog box opened to select the printer and print the report, so therefore you cannot directly call document.print when using a virtual printer.

You may want to check this link for more information on Virtual printer. I have attached a sample application which has two buttons, which will give you the elapsed time to print the report. One button makes the use of the normal print settings and the other one makes use of the virtual printer. Please run the application and let us know what time you get in either case.

I hope this is of some help.

Regards,
Sankalp
Sankalp Sen
GrapeCity- DataDynamics
   Report 
   06-23-2009, 7:20 AM
thinkjohn is not online. Last active: 4/9/2009 10:35:35 PM thinkjohn

Not Ranked
Joined on 08-31-2004
Secaucus
Posts 14
Re: Generating Report is very slow with new print server
The virtual printer works great. I am using this for some of my applications.

For one application in particular, I need to be able print duplex if the printer supports it. If the printer supports it, I need to insert blank pages in some places so that documents that need to be seperate are not printed on the same page.

For instance, I have 4 reports that are 5 pages each. I combine them into 1 document before calling Document.Print.
If my printer supports duplex, I insert blank pages so each report starts on a new page and not the back page of the pervious report.

If the printer does not support duplex then this is not an issue...

Once all the reports are combined, this is sent directly to the default printer via Document.Print().
   Report 
   06-24-2009, 2:50 AM
SankalpS is not online. Last active: 2/8/2010 7:07:01 PM SankalpS

Top 25 Posts
Joined on 12-11-2008
Posts 632

DDStaff
Re: Generating Report is very slow with new print server
Thinkjohn,

If you want to add a blank page then you need to add a blank report to your project and insert the blank page of that report in between the reports which you are going to merge. For example if there are two reports with the name rptOne and rptTwo which you want to merge and want to add a blank page between them, then you may use the following code:

      private void Form1_Load(object sender, EventArgs e)
        {
            //Create an Object of First Report
            rptOne rpt1 = new rptOne();
            rpt1.Run();

            //Create an Object of Second Report
            rptTwo rpt2 = new rptTwo();
            rpt2.Run();

            //Create an object of blank report
  rptBlank rptBlk = new rptBlank();
            rpt3.Run();
                       
            //Use this line of code to insert a blank page between the two merged reports
            rpt1.Document.Pages.Add(rptBlk.Document.Pages[0]);

             //Now, add the pages of second report to the first report
            rpt1.Document.Pages.AddRange(rpt2.Document.Pages);

            //Set the Viewer Document to the First Report Document
            viewer1.Document = rpt1.Document;

        }

You will notice that I have used the Add method to add the blank page using:
rpt1.Document.Pages.Add(rptBlk.Document.Pages[0]);

So you need to add this everytime, before the line of code, where you merge the next report into the existing report. Do let me know if you need further assistance/clarification.

Regards,
Sankalp
Sankalp Sen
GrapeCity- DataDynamics
   Report 
GrapeCity » Product Support » ActiveReports f... » Generating Report is very slow with new print server

Privacy Policy | Copyright © 1997-2010 - GrapeCity, inc.