|
Hi guys
I am a student in learning Crystal Reports. I know the basic steps to generate it. but the problem is, according to my project, when I am going to generate the reports by passing the parameters indirectly such as login-company-name,UniqueID(which is globally assisted while at runtime), etc., here Indirectly means I don't want to enter that field directly, instead of this it will takes from globally assigned value that is login-company-name. so give the solution for this one.
wish me as All The BEST.
|
|
|
|
|
i using zedgraph to load the date and value from the database(access), to order to convert to double data type, i'm using ToOADate function but eventually my date has become a number such as 33200, can anyone tell me how to convert date to double so it can works n Zedgraph?
Below is the code i use...
Imports System
Imports System.Data
Imports System.Data.OleDb
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents zgc As ZedGraph.ZedGraphControl
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.zgc = New ZedGraph.ZedGraphControl
Me.SuspendLayout()
'
'zgc
'
Me.zgc.IsAutoScrollRange = False
Me.zgc.IsEnableHPan = True
Me.zgc.IsEnableHZoom = True
Me.zgc.IsEnableVPan = True
Me.zgc.IsEnableVZoom = True
Me.zgc.IsScrollY2 = False
Me.zgc.IsShowContextMenu = True
Me.zgc.IsShowCursorValues = False
Me.zgc.IsShowHScrollBar = False
Me.zgc.IsShowPointValues = False
Me.zgc.IsShowVScrollBar = False
Me.zgc.IsZoomOnMouseCenter = False
Me.zgc.Location = New System.Drawing.Point(72, 24)
Me.zgc.Name = "zgc"
Me.zgc.PanButtons = System.Windows.Forms.MouseButtons.Left
Me.zgc.PanButtons2 = System.Windows.Forms.MouseButtons.Middle
Me.zgc.PanModifierKeys2 = System.Windows.Forms.Keys.None
Me.zgc.PointDateFormat = "g"
Me.zgc.PointValueFormat = "G"
Me.zgc.ScrollMaxX = 0
Me.zgc.ScrollMaxY = 0
Me.zgc.ScrollMaxY2 = 0
Me.zgc.ScrollMinX = 0
Me.zgc.ScrollMinY = 0
Me.zgc.ScrollMinY2 = 0
Me.zgc.Size = New System.Drawing.Size(392, 208)
Me.zgc.TabIndex = 0
Me.zgc.ZoomButtons = System.Windows.Forms.MouseButtons.Left
Me.zgc.ZoomButtons2 = System.Windows.Forms.MouseButtons.None
Me.zgc.ZoomModifierKeys = System.Windows.Forms.Keys.None
Me.zgc.ZoomModifierKeys2 = System.Windows.Forms.Keys.None
Me.zgc.ZoomStepFraction = 0.1
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(632, 266)
Me.Controls.Add(Me.zgc)
Me.Name = "Form2"
Me.Text = "Form2"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=C:\Documents and Settings\Administrator\My Documents\Plantation.mdb;User Id='admin';Password='';")
Dim mySelectQuery As String = "SELECT Date,Last FROM Maxis"
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As OleDbDataReader
myReader = myCommand.ExecuteReader()
Dim junk As ZedGraph.ZedGraphControl
junk = zgc
junk.GraphPane.Title = "Test Case for VB"
junk.IsShowPointValues = True
Dim x(100) As Double
Dim y(100) As Double
Dim i As Integer
' Randomize()
For i = 1 To 100
myReader.Read()
MessageBox.Show((myReader.GetDateTime(0)).ToOADate)
x(i) = (myReader.GetDateTime(0)).ToOADate
y(i) = myReader.GetDouble(1)
Next
junk.GraphPane.AddCurve("Sine Wave", x, y, Color.Blue, ZedGraph.SymbolType.XCross)
junk.GraphPane.AxisFill = New ZedGraph.Fill(Color.White, Color.LightGoldenrodYellow)
junk.AxisChange()
' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
End Sub
Private Sub zgc_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zgc.Load
End Sub
End Class
sdasasd
|
|
|
|
|
hello guys,
I am working on a COM object in vb 6 that is posting a URL to possibly a Web service.
The result will be in the form of a xml format eg:
"
<providerpayresponse version="2">
"
"
<payments organisation="My Co" billpaycode="0123" channel="8" brander="7">
<payment commitpayment="1" paymentattemptid="123456789" paymentresponse="xx">
<ref value="34567">
<amt value="9874">
<paymentinstrument>
<unregpi>
<cardnumber value="1234567890987654">
|
|
|
|
|
The MSXML DOM implimentation uses COM, so you can use it from VB6.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Folks,
I am writing an Access database with a 2005 VB.Net front-end. I have 3 fields, "Arrived", "Departed" and "Duration" in the database bound to the form in .Net. I want to enter an arrival time in field number one, enter a departure time in field two, and have field three automagically calculated and populated with the total time spent on site (hours & minutes only). I have the first two fields down, no problem. But....I have scratched my head until it is RAW (:->) trying to get the third field to populate.
I have looked in the .Net books I have, I have searched online, and continue to come up empty with a solution!
Any help from the Guru's would be GREATLY appreciated.
-DON-
|
|
|
|
|
Just subtract Arrived from Departed. The result of that operation is a TimeSpan structure. Use one of it's properties to get the duration in the unit you want; TotalDays, TotalHours, TotalMinutes, TotalSeconds or TotalMilliseconds.
---
b { font-weight: normal; }
|
|
|
|
|
Hello there,
Don't give any suggestions or ask why i need to do this because i have spent too much time with it witout any success. I have a windows service running under system account, interacting with desktop. i need to launch a Gui application written in vb.net(or any Gui app) from my service(also written in vb.net). i am monitoring a program and need to restart when/if it dies. I can launch application and it does show up the gui, user can interact with it as well but only problem is that it runs under system account and i want to make it run under current logged in user(there is going to be only one user logged in to the system where this service is going to run, as we are providing a complete solution where we control all the attributes of system).
Qaiser.
|
|
|
|
|
Hello Alvaro,
We are migrating from VS 2003 to 2005 (VB.Net windows forms), We use the amstextbox in many places and it works great, but in 2005 when I bind the control to a data source, change the value and try to tab out or move out, it just does not exit the control. This happens only when bound, otherwise there is no problem, Have you or anyone else encountered this?
I would very much appreciate your reply.
Thanks a lot.
Canute.
|
|
|
|
|
Hello,
I have a textbox that calls a field value in the footer of my report. When I select Print Preview on my form, the report shows my field value on the last page of the report? How can I get it to show on every page of the report?
Here is the expression in my textbox located in the footer:
=ReportItems!Dealer1.value
Thanks,
Rashar
|
|
|
|
|
you need to call the field in page footer not in report footer. because watever u call in report footer would be displayed on the end of report. In order to display that field at the end of each page u need to call it in page footer.
|
|
|
|
|
Hi,
Thanks for the Reply...
I have this line of code in my page footer: =ReportItems!Dealer1.value
My report is in a matrix, and when produced it may produce 30 lines. 20 Lines are on page 1 and 10 lines on page 2. When I do a print preview, I only see the line =ReportItems!Dealer1.value on the very last page.
How can I see that line on all pages?
Thanks,
Rashar
|
|
|
|
|
Hello!
okay... can u plz tell me where u have placed that text box on ur report. Secondly can u plz tell that where r u assigning the value to text box in ur code(in which procedure).
Thanks,
Noshaba
|
|
|
|
|
I actually figured it out.
I created a group field textBox1 in my matrix. Then in the footer, I created a textbox and assigned the expression ReportItems!textbox1.value to the new textbox in the footer.
Thanks,
Rashar
|
|
|
|
|
hi;
i wish to give me right way in how to use print fucntion and preview print fucntion,... also how to use scan function...
i read ebbok but i didnot get my goal ..
or to use this fucntion..
please..
mohammad bassam yahya
|
|
|
|
|
use window.print() in javascript
Divya Rathi
|
|
|
|
|
Hi. How can I set my application to create a folder using the administrator account (username, password). Note that the hard disk can be accessed only with an administrator account. I want that the administrator enter its username and account, then save it, and my application will be run with windows startup and access the hard disk.
my application will be run on windows 2003 server and I should not force the administrator to login every restart... I want that my application internally use the account...
I'm using vb2005 express...
OmarMallat
-- modified at 15:04 Monday 27th February, 2006
|
|
|
|
|
2 Questins
How do I update my access table with changes from 1 field only?
Is there an easy way to post the whole datagrid to an access table or do I need to loop through every row in the datagrid table.
|
|
|
|
|
to update ur table with one field u can do as follows:
dim con as new adodb.connection
dim rs as new adodb.recordset
con.open connection_string
rs.open "Select * from table1 where field1 = '100'" , con
if rs.eof = false then
rs.movefirst
rs.fields("field1") = txt1.text
rs.update
else
msgbox "record not found"
end if
|
|
|
|
|
I have a multithreaded program that draws stock market charts on as many as eight instances of a form.
When I create instances of this form by clicking a menu item, they come up and are responsive to the user and the other threads. If I create a new instance from a thread other than the UI the form comes up but is not responsive to the user or the other threads.
How does one do this?
RCarey
|
|
|
|
|
The form won't work becuase it's not on the same thread as the application's message pump. Keystrokes and mouse clicks comming into the application have no way of getting to the form because they can't cros thread boundries.
You have to modify your code so the form is created by the UI thread. You can still update the form from a background thread if you call BeginInvoke on the methods to need to call on the form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's where I am now. The arrival of a packet sets the text of a menu item on the main form to the stock's symbol and beeps. I have to click the menu item to create a new form. this works but when events are fast this is too slow.
I tried changing the text of a label on the main form which throws an event. An event handles creates the form but it is still not responsive to the user.
RCarey
|
|
|
|
|
RJGCarey wrote: tried changing the text of a label on the main form which throws an event
Throws a what?? Are you saying it throws an Exception? You can't modify a control from anything other that the thread it was created on. Outside of that, you have to use BeginInvoke.
RJGCarey wrote: An event handles creates the form but it is still not responsive to the user.
Make absolutely SURE the correct thread is executing the code to create the new Form instance. You'll probably have to put together a method to create the Form instance and use BeginInvoke to call it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm just starting to get into the 2005 version of Visual Studio. I'm writing an application that will open Excel and pull in a CSV file for formatting.
I'm just having trouble opening it. In 2003, I would use the reference for Excel 11.0 Object Library and use the following code
Dim xlApp As Excel.Application<br />
Dim xlBook As Excel.Workbook<br />
Dim xlSheet As Excel.Worksheet
Now in 2005 I think I'm supposed to use the reference for Microsoft.Office.Tools.Excel. When I use the code above, it doesn't recognize Application?
Confused? Can someone point me in the right direction?
Lost in the vast sea of .NET
|
|
|
|
|
I'm attempting to convert a .zip file to a string in order to pass as a parameter to a network service (see below code). The streamreader works except that it seems to ignore "non-text" characters and therefore the .zip file is then corrupt/invalid once received by the service.
Dim outstring As String = ""
Try
Dim sr As StreamReader = New StreamReader(INPATH, True)
outstring = sr.ReadToEnd()
sr.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Application.Exit()
End Try
return outstring
Should I be using a different method to convert the source to a string?
|
|
|
|
|
You are instructing the stream reader to detect the encoding of the file, but as the file is not a text file, there is no encoding. It will probably revert to ASCII encoding, resulting in ignoring all non-ASCII values, e.g. every byte with a value higher than 127.
Read the file as a binary file, returning the result as an array of bytes.
---
b { font-weight: normal; }
|
|
|
|