|
Realised u cant install the Windows platform SDK on XP service Pack 2
am planning on a TAPI Videoconferencing software with VB.NET and all teh TAPI and AVP cAPTURE DLLS
Do i need to start using Windows Server to be able to instatll and use the Platform SDK or i can succesfuuly build ma applicaion using Windows XP..
tHANKS IN advance.
phatkin
|
|
|
|
|
prubyholl wrote: Realised u cant install the Windows platform SDK on XP service Pack 2
Really? It worked fine for me and thousands of other people. What's the error you're getting??
|
|
|
|
|
I need to Export data in a Gridview to Excel file, please any body help...
I tried a lot but could'nt make it.
The application is made in VB.NET standalone (NOT web based)
I have a gridview with data, i need to export it to .xls or .csv file
please help...
Jats
|
|
|
|
|
Don't cross post. You already posted this same question in the article I would have pointed you at. If you can't read the article and code in it and understand what it does, noone is going to be able to explain the process to you in a much shorter forum post that will offer nowhere near as much explanation.
If you want other examples you can try, Google for "VB.NET export data to Excel".
|
|
|
|
|
Sorry for cross posting. But the code project page was showing error when i posted in the article.
So i posted here again.
May be the CodeProject site is not working properly. I suppose.
By the way i read the article and understood very well but i have no knowledge of C# so hoping some body can help me.
Jats
|
|
|
|
|
Jats_4ru wrote: but i have no knowledge of C#
BS. You know more than you think you do. Take a look at a bunch of documentation in the MSDN Help for Visual Studio. Notice that there are thousands of examples of small bits of code in both C# AND VB.NET. Compare the two and you'll find C# has a lot in common with VB. Most of what you see has nothing to do with either language anyway since alot of code just manipulates objects in the .NET Framework.
For example, these two pieces out of the MSDN docs on the ManagementObjectSearcher class are, line-for-line, identical:
' VB.NET
Imports System
Imports System.Management
Public Class Sample
Public Overloads Shared Function _
Main(ByVal args() As String) As Integer
Dim s As New ManagementObjectSearcher( _
"root\MyApp", _
"SELECT * FROM Win32_Service", _
New EnumerationOptions( _
Nothing, System.TimeSpan.MaxValue, 1, _
True, False, True, True, False, _
True, True))
For Each service As ManagementObject In s.Get()
'show the instance
Console.WriteLine(service.ToString())
Next
End Function
End Class
using System;
using System.Management;
public class Sample
{
public static void Main(string[] args)
{
ManagementObjectSearcher s =
new ManagementObjectSearcher(
"root\\CIMV2",
"SELECT * FROM Win32_Service",
new EnumerationOptions(
null, System.TimeSpan.MaxValue,
1, true, false, true,
true, false, true, true));
foreach (ManagementObject service in s.Get())
{
Console.WriteLine(service.ToString());
}
}
}
All you have to do is compare each line to see that they both specify the exact same things, just using a slightly different syntax.
|
|
|
|
|
Don't cross post. It's just plain rude.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
i am using .net 2005.i do my project in vb.net windows application.i want to calculate the date for one year.
for (ex)
example-1:
i have 2 date time picker,in first datetimepicker i click 12-14-2007 means,then automatically displayed as 12-13-2008 in second datetimepicker.
example-2:
i have 2 date time picker,in first datetimepicker i click 08-20-2007 means,then automatically displayed as 08-19-2008 in second datetimepicker.
that means i want to calculate one year from i selected date in leap year and without leap year.
|
|
|
|
|
DateTime.Now.AddDays(-1).AddYears(1)
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 all,
I m trying to create a crystal report in vb.net application.
I need to show data from 3 different tables in report.
So i added all 3 tables in Field explorer of crystal report,but i m unable to show the data in it.
For this i have tried two method:-
1>Using joning add data in a single table and set the Datasource of the report to it something like this-
<br />
<br />
Dim rpt As New CrystalReport1<br />
rpt.SetDataSource(MyDataset.Tables(0))<br />
Me.CrystalReportViewer1.ReportSource = rpt<br />
<br />
2>Without joining using two tables for it like this<br />
i)Select data from 1 table<br />
MySqlDataAdapter.Fill(MyDataset, "Table1")<br />
ii)Select data from 2 table<br />
MySqlDataAdapter.Fill(MyDataset, "Table2")<br />
<br />
iii)Select data from 3 table<br />
MySqlDataAdapter.Fill(MyDataset, "Table3")<br />
<br />
Dim rpt As New CrystalReport2<br />
rpt.SetDataSource(MyDataset)<br />
Me.CrystalReportViewer1.ReportSource = rpt<br />
But nothing happened
Any idea would be appreciated heartly
Thanks with anticipation
|
|
|
|
|
First: is you'r dataset filled??
second: in design vieuw of the report (at the bottom of the screen 'main report preview' is there data??
and third you could try the code below, this code will reconnect you'r report with you'r database.
And if you created the report with the tables in field explorer and such you don't even need to set the reportsource when using this code
<br />
Dim rpt As New crystalreport<br />
rpt = reconnectreport(rpt)<br />
<br />
<br />
Private Function reconnectreport(ByVal report As ReportDocument) As ReportDocument<br />
Dim connection As IConnectionInfo<br />
Dim oldServerName As String = report.DataSourceConnections(0).ServerName<br />
Dim newServerName As String = sservername<br />
Dim oldDatabaseName As String = report.DataSourceConnections(0).DatabaseName<br />
Dim newDatabaseName As String = sdbname<br />
Dim userID As String = susername<br />
Dim password As String = spass<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 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 />
hope it was helpfull
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Respect TDDragon
First of all thanks a lot for having look at my post & reply and second sorry for late
As U said i checked all things
1>The dataset is full of data
2>In design view the report shows dummy data in preview report
3>I used your code but i m little confuse boz in your code where i should use the dataset (U used database)?
<br />
Private Sub print_me()<br />
Try<br />
Dim sql As String = ""<br />
Me.cnn.Open()<br />
' sql=Query<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 />
rd.SetDataSource(Me.ds)<br />
new_rd = Me.reconnectreport(rd)<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 />
Private Function reconnectreport(ByVal report As CrystalDecisions.CrystalReports.Engine.ReportDocument) As CrystalDecisions.CrystalReports.Engine.ReportDocument<br />
Dim rpt As New CrystalReport1<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 />
But it gives error that:-
An unhandled exception of type System.StackOverflowException' occurred in CrystalDecisions.CrystalReports.Engine.dll
I think i have missed something
Thanks a lot once again
|
|
|
|
|
the reconnectreport function only reconnects your report to the database so it doesn't set the datasource
best practice is too reconnect the report first and then set the datasource (if needed)
~V~ wrote: rd.SetDataSource(Me.ds)
new_rd = Me.reconnectreport(rd)
becomes:
new_rd = me.reconnectreport(rd)
new_rd.setdatasource(me.ds)
wether or not you need to set the datasource depends on how you designed your report.
If you designed it against a real database using the table structure and such and you don't need to add additional filters then you shouldn't have to set the datasource but if you do need to add additional filters it is somethimes easer to set the datasource with a new sql statement.
example:
you have a report that connects to 2 tables (table1 and table2)
all you want to do is to show the data from the 2 tables without filters
in this case you don't need to do the setdatasource
if you want to show only one record from table1 and the corresponding records from table2
you'd best set the datasource for table1 and table2 in code
On a side note: make sure that the database name,server,username,password you provide in the reconnect function are correct (I suspect you placed dummy data here (as you should)). If these are wrong the report will not connect to the database and most likly crash.
Sorry for the late reply but I was out for the weekend so...
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
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
|
|
|
|
|