|
you can create parameter fields and assign values to it in your VB code from the dataset.
Dim rpt1 As New ReportDocument
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
Dim pvCollection As New CrystalDecisions.Shared.ParameterValues
Dim pdvCustomerName As New CrystalDecisions.Shared.ParameterDiscreteValue
Dim obj_Report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim Anndesc As New CrystalDecisions.Shared.ParameterDiscreteValue
rpt1.Load("C:\CrystalReport3.rpt")
' Set the connection information for all the tables used in the report
' Leave UserID and Password blank for trusted connection
For Each tbCurrent In rpt1.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "AK"
.UserID = "X"
.Password = "Y"
.DatabaseName = "DB"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
pdvCustomerName.Value = dataset.tables(0).Rows(0)(0)
'frm_Viewer.crv_ReportViewer.ReportSource = obj_Report
'Me.crv1.
' Add it to the parameter collection.
pvCollection.Add(pdvCustomerName)
rpt1.DataDefinition.ParameterFields("@pra_id").ApplyCurrentValues(pvCollection)
pvCollection.Clear()
Anndesc.Value = "Announcement Description"
pvCollection.Add(Anndesc)
rpt1.DataDefinition.ParameterFields("@AnnDesc").ApplyCurrentValues(pvCollection)
' Zoom viewer to fit to the whole page so the user can see the report
Dim myrep As New CrystalReport3
crv1.Zoom(2)
crv1.ReportSource = rpt1
|
|
|
|
|
I am currently trying to make software to send bulk emails. As im running a website, im importing text files to import email addresses. The software is almost complete.
Im using SMTP to send the emails, the smtp server has been set as LocalHost which works fine as when I change it an error occurs.
using LocalHost, the software successfully completes its task by sending the email. However, the emails do not send, when i shut down the computer and im not connected it trys requesting information from the domain inwhich im sending the email to, I assume its trying to send the email but it wont send it. Ive only ever recieved one out of loads but it took about 30 minutes, ive also recieved one at the from address which I set saying it couldn't send the email due to some SMTP server error.
Can anybody help me sort this problem out, I want the emails to send instantly?
You can reply to this or email tonymaclennan@yahoo.co.uk
|
|
|
|
|
I am currently trying to make software to send bulk emails. As im running a website, im importing text files to import email addresses. The software is almost complete.
Im using SMTP to send the emails, the smtp server has been set as LocalHost which works fine as when I change it an error occurs.
using LocalHost, the software successfully completes its task by sending the email. However, the emails do not send, when i shut down the computer and im not connected it trys requesting information from the domain inwhich im sending the email to, I assume its trying to send the email but it wont send it. Ive only ever recieved one out of loads but it took about 30 minutes, ive also recieved one at the from address which I set saying it couldn't send the email due to some SMTP server error.
Can anybody help me sort this problem out, I want the emails to send instantly?
You can reply to this or email tonymaclennan@yahoo.co.uk
Thank You
Tony M
|
|
|
|
|
Hi,
I am developing email client in visual basic 6.0.
I can send mails using Winsock control in a system directly connected to the internet.
But if the system is connected to the internet through proxy server then I can send mails.
Please tell me the method to send mails through proxy server or give me some links from where I can find some guide line regarding that.
Thank you.
-Javed
|
|
|
|
|
The procedure would depend heavily on the type of Winsock Proxy support your proxy server supports, if its enabled at all (not likely!). You would have to send a formatted connection request to the proxy server (again, depends on the type of Winsock Proxy supported), and negotiate the connection with the proxy. Usernames and passwords may be required, so you'll have to deal with that also. Again, this will depend HEAVILY on the proxy server and you should consult the documentation on the server to find out what it's requirements are.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi guys,
I have my own class for uploading files via FTP. The file that I need to upload MUST BE encrypted due to security reasons. Does anybody know how to incorporate PGP in vb.net or does anybody knows how to use PGP with VB.NET?
Thanks alot
|
|
|
|
|
check this, it's in C# but i'm sure it can be converted to vb.net or give you an idea at least.
http://www.codeproject.com/csharp/gnupgdotnet.asp
|
|
|
|
|
I'm having a problem in how to implement context menu's
I have a main form that has a 2 listviews on it and a set of radio buttons.
the 2 radio buttons effect the contents of one of the listviews.
Depending upon the listview selected (and its contents in the case of the first listview) I want to create context menu's
I can create context based upon which listview called it but dont seem to be able to reference back to determine which radio button is set OR add a value to the function in the addhandler item when adding the event handler to the context menu item.
Any ideas on ways to implement this would be greatly appreciated. Basically want to make a framework where I can say create a context menu for a specific type - so that if that listview is used on different forms can simply call the CreateContextMenu Function which will create the menu with appropriate hookups to the procedures.
|
|
|
|
|
I'm assuming that since the values change based on what radion button is selected, and that you want to display a different context menu based on what is selected.
I'd suggest creatting 2 different context menu's in design view, then when a radio button is selected, change the listview.contextmenu property to the respective context menu.
|
|
|
|
|
That may work in this instance - but the concept is that I want something that is generic enough that I can re-use anywhere in app. Having to create many context menu's of different forms is not really what I want to occur.
So What I'd like is that I can Call a routine CreateContextMenu(byval MenuType as integer)
which would create a Context Menu for a specific type of Menu (Say Business Code, Order, Invoice etc.)
This adds Standard menu item such as "Open", "New" etc. which at the moment are calling functions called OpenFunctions and NewFunctions. which determine the actual real function to be called such as OpenOrder, OpenBusinessCode etc.
Determining which specific function to be called is handled by looking at a application level property which changes depending upon the listview currently selected.
Ultimately what I'm trying to do is pass a parameter into the OpenFunctions and NewFunctions procedures which are used to determine the specifc type of menu to create.
But that would involve when setting up menuItems making the AddressOf clause pointing to the function accept a paramater
So Ideally I'd like to do something like
Sub OpenFunctions(byval iType as integer)
Dim conMenu As New ContextMenu
Dim menuItem1 As New MenuItem
IF iType <> 0 then
menuItem1.Text = "&test"
conMenu.MenuItems.Add(menuItem1)
AddHandler menuItem1.Click, AddressOf OpenFunctions(iType)
else
throw new exception ("Invalid Type!!!")
end if
End Sub
But cant seem to get the following line .... to work
AddHandler menuItem1.Click, AddressOf OpenFunctions(iType)
I think this is the key - being able to pass the addressof a function with parameters.
|
|
|
|
|
Ok did some testing Here is what I'm going to suggest.
Since you are wanting to reuse the creation of these contextmenu's throughout your program, What I did, is create a class library within your project, create your function to create the contextmenu, and return the context menu. Here is what my class looks like
Imports System.Windows.Forms
Public Class Class1
Public Function createmenu()
Dim conMenu As New ContextMenu
Dim menuItem1 As New MenuItem
menuItem1.Text = "&test"
conMenu.MenuItems.Add(menuItem1)
AddHandler menuItem1.Click, AddressOf opentest
Return conMenu
End Function
Public Sub opentest(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("Test for opentest worked")
End Sub
End Class
Make sure, on your Forms, you set reference for this class library,
My Form code looks as follows
Imports testing_contextmenu.Class1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conmenu2 As New ContextMenu
Dim testing As New testing_contextmenu.Class1
conmenu2 = testing.createmenu()
ListView1.ContextMenu = conmenu2
End Sub
So I believe the easiest solution would be to create the class library, create your functions to create your menu's, and returrn those as I have done, Hope this helps, or gets ya in the direction you want.
|
|
|
|
|
Thanks for the idea - but heres the problem....
Lets say the function OpenTest that your calling, Is as a result of a right click on a listview.
From a listview I need to be able to pass a parameter of which Item I want to open. Which is the listview item ID column. The Sender and e values are that of the menuitem1 and not of those of the listview that was right clicked....
So in this case I need the menu that is not generic enough that I can either pass a reference to a listview or have a parameter passed to tell it what item to Open.
Simply displaying a messagebox when value is clicked is not enough.
So possibly its trying to pass a value into createcontextmenu function and pass this through to the Opentest - but the signature then doesnt match and the line
AddHandler menuItem1.Click, AddressOf opentest
will not work.
|
|
|
|
|
Would anybody have any information on a website which specifically focuses on designing custom GUI's using VB.net. Something that would teach you how to make a GUI which looks more like a real life object instead of a windows form. This would be for a windows desktop application by the way.
Thanks in advance...
|
|
|
|
|
hi
i need help in fix som errors in icon project
if anyone can help please send email to me at
houssam@mail2alpha.com
Thanks
|
|
|
|
|
What is your problem? Noone is going to send you an email asking the very same question...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am using MSChart in VB.net to show a graph in real time. I'm graphing temperatures taken every second or 1/4 second. The problem i'm having is that i want to graph it for more than 15 minutes. that means thousands of data points. The way i'm doing it now, setting the rowcount to the time i need, takes about 5 mins to load. Is there any other way to load this quicker? here is the code i'm using now that takes so long:
AxMSChart1.RowCount = totalReads
thanks for your help!
megadith
|
|
|
|
|
No, there isn't. MSChart has to revealutate every single point in the data set to get the correct scale of the graph. Like you said, there are thousands of data points, so it's going to take a long time to get through them. The MSChart object was not written to handle real-time graphs. If this is your goal you'll have to look into a 3rd party control written to handle real-time graphing on a large dataset like this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
shoot! thats what i was afraid of.
Thanks Dave, i appreicate it.
Do you know of any good 3rd party control off hand? thanks!!!
Megadith
|
|
|
|
|
I am just wondering whether VB.NET framework provides any simple string grid where I can display set of rows and columns. I know I can use thirdparty controls and DATAGRID. If anyone know any other thing is available for me to display strings on a simple grid please send reply .
Thanks
Ajay
|
|
|
|
|
Using Datagrid is very easy and essential. I can provide you with some samples how read from SQL and load the info in grid and how to access a specific row in it. That may help.
|
|
|
|
|
I'm trying to save the OLE objects in a MSWord document in separate files. So I want to iterate through each shape , access its OLE object, convert it into an image and save the image to a file. However when I try to access the shape.OLEFormat.object it gives me a run-time error saying "No such interface supported". Here's a snippet of the code:
dim myrange as range
dim oShape as word.shape
dim chart as graph.chart
myrange = doc.paragraphs(1).range
for i = 1 to myrange.shaperange.count
oShape = myrange.shaperange(i)
select case oShape.type
case msoShapeType.msoEmbeddedOLEObject
chart = Ctype(oShape.OLEFormat.object,graph.chart)
case else
...
end select
next
Can anybody tell me where I'm going wrong ??
Smriti
|
|
|
|
|
Yeah, the OLEFormat.object is not convertable to a Graph.Chart object. You must use the methods on the OLEFormat object to manipulate it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually all I had to do was invoke OLEFormat.edit() and then access the object property to cast it into a chart object.
shape.OLEFormat.edit()
Graph.chart chart = shape.OLEFormat.object
And this works.
Thanks anyway.
|
|
|
|
|
I have a digitizer pad and I want to design a simple program that will read the input from it and output the X,Y coordinates into a file for a research experiment. I have some experience with C++, but I have no idea how to communicate with the driver, it can be plugged in to either a USB port or a Serial port. I don't know where to start. Any help would be appreciated even if you could suggest another forum that would be better suited to answer this question.
|
|
|
|
|
SonnyBono wrote:
but I have no idea how to communicate with the driver,
You've already got two strikes against you. You'll need the Software Development Kit, or at least the API documentation for the device before you even think of doing anything like this. If you don't have either one, you'll find it as easy as climbing to the top of Mt. Everest in a Speedo.
Now, the Serial version would be alot easier to do because you can at least talk directly to the tablet without the need for a driver, unlike the USB version. But! You'll still need the API documentation so you can talk intelligently with the device. This means docs on what commands you need to send back and forth and in what formats, what the data is going to look like coming from the device, how to reset it, how to calibrate it, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|