 |
|
 |
after I got the values of certain field. it always display them in vertical way. How can I display them in horizontal way
|
|
|
|
 |
|
 |
Hi,
When I tried to print first time, i got an error saying "there is no date at row ##" then i insert the fallowing lines into prnDoc_PrintPage function
PageNumber = 0
SumList.Clear()
dbCursor = 0L
There's the actual problem comes up, it try to print infinity number of pages, last page number I saw was 986 which is kinda infinity already for 2 page report I guess.I should also say that all pages are the first page, non of these 986 pages contains any data from the second page!
PS: i didn't actually print them on paper, I just saved the output as PDF file.
|
|
|
|
 |
|
 |
Hi friends,
i'm new in windows application. can u please give me an idea about the crystal report generation. i searched lot but in confusion..different articles in different ways.. help me please
cheers..
|
|
|
|
 |
|
 |
I tried using this with a Stored Procedure and Filling the dbset with an adapter I used from my object and that all worked but It gave me the error that it could not find Column 46 but there is no Column 46 so what do I do now?
Error was: out of Range Exception
thanks,
Jason
|
|
|
|
 |
|
 |
There is a swarm of bugs in this code, unfortunately it is a nice piece of code , but it should be fixed so that others can take a chance at it.
First of all:
1) The document does not print, i guess it goes beyond the end of the dataset as the message is "there is no row at position 72"
2) If you try the "fixes" proposed here it will just loop infinitely
3) It is a huge chunk of code , it should be broken down in small units in order to read it properly.
4) if you try to comment any of the try-catch structures the document crashes "method not supported" this means that with the try -catch mechanism suppresses some other error.
Hope this feedback helps and also i hope you still want to edit this post as it is a promising piece of code, nice idea as you tried to approach it from a different angle.
Hope for a fast feedback.
Dan
.NET DEVELOPER
"The universe and the developers were always in a war. Developers trying to create idiot-proof programs and the universe creating idiots. The universe seems to win.... img src="/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" />
|
|
|
|
 |
|
 |
I noticed that the pagenumber is not increased while having multiple pages.
This could be fixed in the same area that resets dbCursor
I solved it in the following manner and that works fine, including printing and reprinting.
If hasSum Then
If Not (dbCursor = dbSet.Tables(0).Rows.Count) And (Not printSumComplete) Then
e.HasMorePages = True
PageNumber += 1
Else
e.HasMorePages = False
dbCursor = 0
PageNumber = 1
End If
Else
If Not (dbCursor = dbSet.Tables(0).Rows.Count) Then
e.HasMorePages = True
PageNumber += 1
Else
e.HasMorePages = False
dbCursor = 0
PageNumber = 1
End If
End If
Richard
|
|
|
|
 |
|
 |
Dear Pakorn,
If you want to print the preview, an error occurs on table boudaries.
This is caused by the dbCursor that follows the datatable.
The problem can be overcome by resetting dbCursor fter the last page is printed.
If hasSum Then
If Not (dbCursor = dbSet.Tables(0).Rows.Count) And (Not printSumComplete) Then
e.HasMorePages = True
Else
e.HasMorePages = False
dbCursor = 0
End If
Else
If Not (dbCursor = dbSet.Tables(0).Rows.Count) Then
e.HasMorePages = True
Else
e.HasMorePages = False
dbCursor = 0
End If
End If
If the dbCursor = 0 line is inserted in both scenarios, I am now able to reprint the report as often as I want.
Hope this is of help.
With kind regsrd,
Richard Elias
|
|
|
|
 |
|
 |
I am wondering if this dynamic report can have something like pageheader or pagefooter? It is because I have 2 db want to print. The header would like to put in pageheader, and detail in your normal details section.
|
|
|
|
 |
|
 |
When I click the print button, if the report page more than 1,
there is a message box "Generating Preview" show "page xxx of document" never stop, I think it's a recursive loop.
I don't know how to fix this problem.
Thanks a lot!
|
|
|
|
 |
|
 |
I tried to print the report to printer. When I looked at print preview, it was perfectly OK. I tried to print via pdf writer. I worked fine.
However, when I printed directly to printer, the page was inflated, i.e., the computer seemed to print on a A4 X 120% paper. Printing was OK on Left and Top Margin but was not OK on Right & Bottom margin. I temporarily fixed it by changing Bottom and Right margin to a larger number.
I do not have the inflated printing problem using MS Words, Excel & etc.
Does anymore have this problem?
I used Windows 2000. fyi
-- modified at 4:01 Tuesday 16th May, 2006
|
|
|
|
 |
|
 |
Hi,
Thanks For Posting Such a Great Code!
But I have a small problem. I need to group the data as per a Customer Name and print it similar to the following format in the same report.
Ex:Dispalying the Invoice Details Per Each Customer
Customer Name:Abc
SNo. Items Itemname Price
1 4 Blade $11
2 2 Paper $2
Customer Name:XYZ
SNo. Items Itemname Price
1 2 Candies $10
2 2 Dolls $24
etc.
Pls help me to figure it out.
Thanks in Advance
Sri
|
|
|
|
 |
|
 |
Hi
I am also interesting to this question and facing this problem to generate the report!
Do any 1 have the solution?
Thank
Bryant
|
|
|
|
 |
|
 |
i want to perform operation Such as Insert,Delete,Edit records in DB.
how to perform.
|
|
|
|
 |
|
 |
nice implementation until i actually clicked the printer icon...
add this routine to restart the printing from the preview form otherwise, it trys to print from beyond the recordset
Private Sub prnDoc_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles prnDoc.BeginPrint
InitPrint()
End Sub
|
|
|
|
 |
|
 |
Can the report exported to word. It will make the report generator complete and editable
wooohoo
|
|
|
|
 |
|
 |
All I get when I try to print the Dynamic Report is
A message box saying:
"Please send error message to me for better program,Thank you :There is no row at position 77."
Any help please!
Thanks
Stan
VB_Dot_Net@msn.com
vb_dot_net
-- modified at 15:15 Monday 26th December, 2005
|
|
|
|
 |
|
 |
Helo,
This not a problem
This is a little mistake
Don’t worry
Please add this three line in your prnDoc_PrintPage()
1 PageNumber = 0
2 SumList.Clear()
3 dbCursor = 0L
Good luck
anish mm
|
|
|
|
 |
|
 |
Thank you very much. I will fix it.
|
|
|
|
 |
|
 |
hello,
thx for sharing this project. It's great!
However, when i put these three lines in the code, it works fine if you don't change the format of the page. When you change the format from A4 to A4 rotated, something weird happens. I don't know if you encountered the same problem.
But the rest works real nice. Nice work...
greetz
shigeeru
|
|
|
|
 |
|
 |
If you move the colcount one end if up, this should do the trick.
'------------------ sum ---------------------
If dbSet.Tables(0).Rows(dbCursor)(i + C_has_sumarize) = "Y" Then
SumList(ColCount) += PrintObject
End If
'------------------ end sum -----------------
End If
ColCount += 1
Next i
Next j
Richard
|
|
|
|
 |
|
 |
Thank you very much for your suggestion. I will correct it and upload to code project now. I'm sorry for my bug.
|
|
|
|
 |
|
 |
Hi,
First of all great work... the thing works fine but with one minor flaw. When I am trying to have 2 columns sumurized, it will give me the totals, but both will have the same results.
What do I do to arrange this.
EXAMPLE:
column 1 sum should be = 200.00 and it gives me a result of 200.00
column 2 sum should be = 20.00 BUT gives me a result of 200.00
it's like there's only one possibility for
'Has summarize in this column (Y/N)' feature
Marc-André Parizeau
|
|
|
|
 |
|
 |
Thank you very much for your suggestion. I will correct it and upload to code project now. I'm very sorry for my bug.
|
|
|
|
 |
|
 |
Dear Pakorn,
I am interested in your Dynamic Report project. I tried it but could not get the data query result in PrintPreview. Yes, the Table's Headers is visible (and looks so nice too).
Could you please show me the way how to do that.
Regards,
mansii
|
|
|
|
 |
|
 |
Thank you for your interesting
Please copy your query to it or send to my mail(pakorncs@yahoo.com or pakorncs@bizslash.com).If it's possible, please send your table structure (maybe create table statement) to me too. I will check them.
|
|
|
|
 |