473,386 Members | 1,793 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,386 software developers and data experts.

long generating report

6
I'm using PrintPreviewDialog in vb2005 and it takes 1min to generate report with a single word.. is it vb bug or what? is there anything to make thing faster?
Mar 17 '08 #1
6 1102
ot1
2
Shouldn't you have posted this in the .net Forum???

I'm using PrintPreviewDialog in vb2005 and it takes 1min to generate report with a single word.. is it vb bug or what? is there anything to make thing faster?
Mar 17 '08 #2
daniel aristidou
491 256MB
Shouldn't you have posted this in the .net Forum???
No its ok here......
in should not be taking so long..... would you mind posting your code
Mar 17 '08 #3
jefer
6
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
  3.         Dim g As Graphics = e.Graphics
  4.         Dim message As String = System.Environment.UserName
  5.         Dim messageFont As New Font("Arial", 24,System.Drawing.GraphicsUnit.Point)
  6.         g.DrawString(message, messageFont, Brushes.Black, 100, 100)
  7.     End Sub
  8.  
  9.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  10.         PrintPreviewDialog1.ShowDialog()
  11.     End Sub
  12. End Class
  13.  
and in PrintPreviewDialog1 properties -document set to PrintDocument1
Mar 18 '08 #4
debasisdas
8,127 Expert 4TB
That also might be because of your system configuration.
Mar 18 '08 #5
jefer
6
none of other programs have problems with that..
printing operation also takes one minute
Mar 18 '08 #6
daniel aristidou
491 256MB
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
  3.         Dim g As Graphics = e.Graphics
  4.         Dim message As String = System.Environment.UserName
  5.         Dim messageFont As New Font("Arial", 24,System.Drawing.GraphicsUnit.Point)
  6.         g.DrawString(message, messageFont, Brushes.Black, 100, 100)
  7.     End Sub
  8.  
  9.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  10.         PrintPreviewDialog1.ShowDialog()
  11.     End Sub
  12. End Class
  13.  
and in PrintPreviewDialog1 properties -document set to PrintDocument1
ok what i dont like about your code is the dim g as graphics
instead use the with property
Expand|Select|Wrap|Line Numbers
  1.   Dim message As String = System.Environment.UserName
  2.         Dim messageFont As New Font("Arial", 24,System.Drawing.GraphicsUnit.Point)
  3. with e.graphics
  4.        .DrawString(message, messageFont, Brushes.Black, 100, 100)
  5.     End Sub
  6. End with
  7.  
Mar 19 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: alexz | last post by:
Generating a report Alexander | Posted 11:05am 31. March 2004 Server Time | 3 Tables 1) Titles - The course titles 2) Courses - The schedules Courses 3) Students - Coueses a Student is...
0
by: Raghavendra | last post by:
hi, we r using forms authetication. problem :- i am using the below code to generate excel report but since we r using forms authetication.. after generating excel report the browser directs...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
0
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
3
by: billa856 | last post by:
Hi, >I have project in MS access. >In that project I am generating some reports for my company. >Now In my form I have one combobox(PalletNo_combo) >when I select an item from combobox and then...
0
by: Aswanth | last post by:
I'm Generating Reports in SSRS-2005.. Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to...
0
by: Aswanth | last post by:
I'm Working with Asp.Net with C#.. & I'm Generating Reports in SSRS-2005.. Till Now I'm Generating Reports in SSRS-2005 with Stored Procedure.. in Which I'm Generating Reports for One...
2
by: veer | last post by:
hi i made program in which i am generating the report of a ms-table database it works fine only on my computer and generatin the reports but when i run this exe on any computer the whole programe...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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.