|
Any help would be appreciated
|
|
|
|
|
Sorry to trouble u
But i m facing the same problem after changed the line as u told me
<br />
Private Sub print_me()<br />
Try<br />
Dim sql As String = ""<br />
Me.cnn.Open()<br />
sql = "select a.srno,a.amount,c.name,b.h_name from satrans as a inner join hor as b on a.h_id=b.h_id inner join party as c on a.party_id=c.party_id where a.match_id = 1"<br />
<br />
ad = New SqlDataAdapter(sql, cnn)<br />
ad.SelectCommand.CommandType = CommandType.Text<br />
Me.ds = New DataSet<br />
ad.Fill(ds)<br />
Me.cnn.Close()<br />
<br />
Dim rd, new_rd As New CrystalDecisions.CrystalReports.Engine.ReportDocument<br />
rd.Load(Application.StartupPath + "\CrystalReport1.rpt")<br />
<br />
new_rd = Me.reconnectreport(rd)<br />
rd.SetDataSource(Me.ds)<br />
<br />
Catch ex As Exception<br />
MessageBox.Show(ex.ToString, "Crystal", MessageBoxButtons.OK, MessageBoxIcon.Error)<br />
Me.cnn.Close()<br />
End Try<br />
End Sub<br />
<br />
<br />
Private Function reconnectreport(ByVal report As CrystalDecisions.CrystalReports.Engine.ReportDocument) As CrystalDecisions.CrystalReports.Engine.ReportDocument<br />
<br />
Dim rpt As New CrystalReport1 '### The error occured here<br />
rpt = reconnectreport(rpt)<br />
<br />
Dim connection As CrystalDecisions.Shared.IConnectionInfo<br />
Dim oldServerName As String = report.DataSourceConnections(0).ServerName<br />
Dim newServerName As String = "SYSTEM2"<br />
Dim oldDatabaseName As String = report.DataSourceConnections(0).DatabaseName<br />
Dim newDatabaseName As String = "xcpa"<br />
Dim userID As String = "sa"<br />
Dim password As String = ""<br />
report = report<br />
' Change the server name and database in main reports<br />
For Each connection In report.DataSourceConnections<br />
If (String.Compare(connection.ServerName, oldServerName, True) = 0 _<br />
And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then<br />
' SetConnection can also be used to set new logon and new database table<br />
report.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _<br />
newServerName, newDatabaseName, userID, password)<br />
End If<br />
Next<br />
' Change the server name and database in subreports<br />
Dim subreport As CrystalDecisions.CrystalReports.Engine.ReportDocument<br />
For Each subreport In report.Subreports<br />
For Each connection In subreport.DataSourceConnections<br />
If (String.Compare(connection.ServerName, oldServerName, True) = 0 _<br />
And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then<br />
' SetConnection can also be used to set new logon and new database table<br />
subreport.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _<br />
newServerName, newDatabaseName, userID, password)<br />
End If<br />
Next<br />
Next<br />
Return report<br />
End Function <br />
Error is:-
<u>An unhandled exception of type System.StackOverflowException' occurred in CrystalDecisions.CrystalReports.Engine.dll</u>
Thanks once again
modified on Wednesday, December 19, 2007 6:13:21 AM
|
|
|
|
|
I have a datagridview combobox column that needs to load a list of sorted "PRODUCTs". But when i try to sort the products. it gives me error saying that
Datagridview column cannot be sorted..!
any suggestions or way out?
:- Rashid Ali -:
|
|
|
|
|
I want to change the color of all text that i given in inutbox .But when i write code for that ,it chage the first maching word not all.
My code is
richtextbox1.selectionstart=richtextbox1.find(value) 'value contains the selected text
richtextbox.selectioncolor=colordialog1.color
I use inputbox for selecting that word .If the richtext box contains that word change the forecolor.But when i using the above code it chage only first selected maching word.
|
|
|
|
|
You've found the first instance of the text, and you've changed it. You need to step through and find the others, to change those too.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Want help to know how to read pdf file content using visual basic 6.
|
|
|
|
|
Wow - why are you using VB6 ? VB6 was only ever useful because of the C++ components it could use to do real work. You need to find someone who still sells VB6 components, and buy one to read PDFs.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a bigest project in my life. I develop it using VB.NET.
My project can saperate into many part here:
- client-user account
- customer account
- material account
- store
- point-of-sell (storefront)
- purchasing cycle
- and accounting
In the store and point-of-sell parts I need to use barcode reader and I need to generate barcode label by myself but I can't find any resource about barcode format and generating
If anyone can help me through this problem or can point me to any resource, I would thank you very much.
------------------------------------
my e-mail: s_thamvarodom@hotmail.com, s_thamvarodom@yahoo.com
(Thailand, Asia)
T. Sittichai
|
|
|
|
|
http://www.codeproject.com/info/search.aspx?artkw=barcode+format+and+generating&sbo=kw[^]
You can call C# dlls from VB.NET.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your guide but when I follow the link to search, it found only one article and it's not the one that you specific me to read, please show me the url to the right article.
Thank you again.
S. Thamvarodom
|
|
|
|
|
sitt wrote: I need to generate barcode label by myself but I can't find any resource about barcode format and generating
If you didn't find anything, it's because you either didn't search at all, or your eyes were closed when the search results came up.
Google for generate barcode in vb.net[^]
|
|
|
|
|
Hey, I ask you for a help not for a complain but thank you for your response.
First of all I'm newly in microsoft technologies and I never learn for the barcode technology before and I need to implement it for my project but I spent my time for about 6 hours to find topics about barcode on the internet, I searched on google but when result came up it's only commercial product advertising, I tried not I didn't find. I accept that I'm not smart but at least I'm try to get it successed so I ask you to help me.
modified on Sunday, December 16, 2007 9:47:46 PM
|
|
|
|
|
sitt wrote: First of all I'm newly in microsoft technologies and I never learn for the barcode technology before
The problem has nothing to do with either. If you want to successfully write code, no matter the language or technology, the single most important skill you must have nothing to do with programming. It's the ability to do research. How to find information using, and refining the correct search terms, how to hypothesize, and how to test those hypothesis. If you don't know this skill - learn it. It's far more useful than knowing how to write code.
|
|
|
|
|
|
All you need is font, and calculate check digit when forming the bar code (ie Code+CheckDigit).
And I _assume_ that, as you might be printing bar code labels to be pasted on products, and the labels might not be large enough to be scanned, if you use a normal printer, you should get a bar code printer instead. The ways of configuring the bar code printer should come with the bar code printer.
To use the barcode reader, you don't usually need to do much else, as the reader acts as a keyboard. Just make the cursor is on the capturing control (textbox) and the barcode is of correct code.
|
|
|
|
|
Thank you very much, I got the concept. Now, I'm getting barcode fonts and paper about how to generate checking digit (I got it from one article about barcode in this website and he posted the URL to find out how to generate barcode checking digit) and I will implement it.
Thank you.
S. Thamvarodom
modified on Sunday, December 16, 2007 9:46:45 PM
|
|
|
|
|
CodeProject holds over 30 articles on barcodes, some use special fonts, some draw
the lines themselves.
in 6 hours you could have read all of them.
|
|
|
|
|
I have a dll file can be linked with VB 6.0. In VB 2005, I tried to use "Add Reference" to link the dll, but I got an error for checking if the file is assembly or COM components. Can I do "Declare" like VB 6.0 to call functions in dll?
VB 6.0->
Public Declare Function Cmod2WireWriteBlock _
Lib "cmodcomm.dll" _
(ByVal DeviceAddr8 As Integer, _
ByRef InBuffer() As Char, _
ByVal BUFSIZEcount As Integer) _
As Boolean
|
|
|
|
|
Add reference is only good for COM or .NET dlls. p/invoke may work.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Heya,
Just a quick question. I am writing a stack application in which there is one requirement that data structure must make use of a block of memory allocated when the stack is constructed. Now which data stucture is most appropriate for this. Is it sensible to use linked list or not.
ta
James
|
|
|
|
|
I think you should put on your flame-retardant suit.
|
|
|
|
|
A Linked list, by its very nature, is dynamic; you can't use a stack for it.
Unless I'm making a huge mistake (and I've made plenty in the past ), you are going to be stuck with arrays*.
* You _could_ also use fixed-size stacks and queues and dequeues, but they're just sexed up arrays.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
|
Vikram A Punathambekar wrote: A Linked list, by its very nature, is dynamic; you can't use a stack for it.
A linked list by it's very nature is in fact a stack without push and pop functions.
xacc.ideIronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Out! Out! Out! Out damned spot! You have soiled our lounge enough!
For this kind of dirty talk you post in the forums! Hence the massive CLICK HERE! tagged with a pretty and upright exclamation point so that you may look at it and eject and stutter your verbal wonder and awe that such technology exists as may transfer you to another page where you could post your response with little fear that black hooded executioners such as many developers you will find crawling through this swamp known as the lounge that happens to be the incorrect location to post programming questions because it is where we lounge[^] and not discuss direct programming questions because those questions are to be posted in the proper location the access of which begins with the blue hyperlink that legibly reads click here.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
modified on Friday, December 14, 2007 1:11:59 AM
|
|
|
|