|
Is there anybody there have an idea to resolve this vb to crystalreport XI connection problem...
Im using VS2005 VB and MS ACCESS '07 and Crystal Report XI R2
Here's my code
******************
<br />
Private Sub myReportForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Try<br />
ChildFormAutoSizeFit(Me)<br />
Me.Cursor = Cursors.WaitCursor<br />
Me.MdiParent = frmMain<br />
<br />
crxApp = New CRAXDRT.Application<br />
<br />
crxReport = crxApp.OpenReport(strCRSourcePath, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)<br />
<br />
crxDataBase = crxReport.Database<br />
crxTables = crxDataBase.Tables<br />
<br />
For Each crxTable In crxTables<br />
crxTable.Location = DataSource 'My .mdb source path<br />
crxTable.SetLogOnInfo("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & crxDataBasePath, "myDatabase.mdb", "", "myPassword")<br />
Next crxTable<br />
<br />
'**** Note:<br />
'When ever i used this recordSelectionFormula? it works properly<br />
'and it get connected and show the report but then this<br />
'recordSelectionFormula is something limited for filtering data thats<br />
'why i need to use more flexible filter like CRXDRT.Report.SqlQueryString<br />
'but then my problem is the login connection from the database is somewhat failed...<br />
'****<br />
<br />
'this RecordSelectionFormula works<br />
'crxReport.RecordSelectionFormula = strSelectionfrm<br />
<br />
'this SQLQueryString failed.. why?? what's the different?<br />
crxReport.SQLQueryString = strSqlQuery<br />
<br />
AxCRViewer1.ReportSource = crxReport<br />
AxCRViewer1.ViewReport()<br />
<br />
Catch ex As Exception<br />
MsgBox(ex.ToString())<br />
Finally<br />
Me.Cursor = Cursors.Default<br />
End Try<br />
End Sub<br />
<br />
************
here's my "strSelectionfrm"
***************
<br />
strSelectionfrm = "{CmpnyDetails.IDNo} like '*' and {tblCompanyDetails.Status} = 'REGULAR' and {Attendance.AFrom} in #" & Format(DatePickerFrom.Value, "MM/dd/yyyy") & "# to #" & Format(DatePickerTo.Value, "MM/dd/yyyy") & "#"<br />
*****************
and here's my "strSqlQuery"
*************
<br />
strfilter = "Select * from CmpnyDetails as cd left outer join Attendance as att on att.IDNo = cd.IDNo where (att.AFrom Between #" & Format(DatePickerFrom.Value, "MM/dd/yyyy") & "# and #" & Format(DatePickerTo.Value, "MM/dd/yyyy") & "#) and cd.[Status] = 'REGULAR' and cd.IDNo like '*'"<br />
*****************
Please anybody can help or any idea with this?...
Please????...
a lot of appreciation in advance....
Thanks....
|
|
|
|
|
Hi guys i was wondering if anyone ran across any ID3v2 tags where the id3v2 tag, and the frame size's weren't sync byte together. I seem to be having a problem with this. thanks.
|
|
|
|
|
Hi
I'd like to use a multiline text box for my users to input a string (with new lines) so that it can be passed to a string variable as the body of an email.
As I thought simply setting the string variable to the .text property of the text box does not keep the newlines but I'm unsure how to proceed.
Any advice on how best to achieve would be gratefully received.
Thanks
|
|
|
|
|
If the user just types and types, never hitting ENTER, then there are no newlines, even if there appears to be because the textbox automatically wraps overflow text from one line to the next. This does NOT insert newline characters. The user would have to hit enter at the end of every new line where you wanted them to place line breaks.
|
|
|
|
|
Hi,
set TextBox.WordWrap false to force your users to actually hit the enter key
when reaching the right margin. You will loose the automatic wrap feature, but
now the TextBox.Text is what you want it to be.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi, I have a security program that, when opened, waits 1 min. before opening the password prompt box. When the password is entered correctly a msgbox opens up saying "Would you like to re-enable this security program?" This msg box has "Yes" or "No" MsgBoxResult option. I need help for the "Yes" part. When the user presses yes, I would like the program be what it was like right after the program was opened.
|
|
|
|
|
OK, you've got two options. Either launch a new copy of your program, closing the existing copy after the launch, or, you write your code so that there is a method that resets all of your controls and variables to their starting values. There is no single command that's going to do this for you.
|
|
|
|
|
Hi,
you could try and create a main form that remains invisible, and basically contains a loop
in which you instantiate and show a second form (your current initial form) until your
MsgBoxResult says "No".
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Does anyone know how to redirect to a specific file. when i use response.redirect("default.aspx") it looks in the current folder. How do i redirect to a file in a different folder. I have tried the file location ("c:\websites\default.aspx")but does not work.
many thanks
|
|
|
|
|
You should post this in the ASP.NET forums.
Response.Redirect requires a remote path, not a local path, e.g. Response.Redirect("http://example.com/full/path/to/default.aspx") or Response.Redirect("../../default.aspx")
|
|
|
|
|
Youc can also try
Response.Redirect("~/default.aspx")
Ask not whether it is useful. Ask what it is useful for.
|
|
|
|
|
can anyone help me out...i can show time in text box..how do i save it by insert sql statement....and hw can i insert into database
my quetion is..once enter pass and id..date and time will automatically insert to database..so end of the month i can retrive in crystal report.
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click<br />
Dim dateTimeInfo As DateTime = DateTime.Now<br />
<br />
<br />
Dim Emp_IDDataRow As DataRow<br />
Comdataset = Com.getCOMDataset<br />
Emp_IDDataRow = Comdataset.EMPLOYEE_DETAIL.FindByEmp_ID(txtID.Text)<br />
With Me<br />
If Emp_IDDataRow IsNot Nothing Then<br />
txtPass.Text = Emp_IDDataRow!Password.ToString<br />
MessageBox.Show("Login Successful!", "infor", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
Me.TextBox1.Text = .getdate()<br />
txttime.Text = Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)<br />
txttime.DataBindings.Add("text", LOGIN_OUTBindingSource, "LogIn_time")<br />
MessageBox.Show(dateTimeInfo)<br />
Form2.Show()<br />
ElseIf Emp_IDDataRow IsNot Nothing Then<br />
MessageBox.Show("Invalid Password!", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
ElseIf Emp_IDDataRow IsNot Nothing Then<br />
MessageBox.Show("Invalid ID", "ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
End If
thanks in advanced
modified on Thursday, April 10, 2008 12:20 PM
|
|
|
|
|
You can get a decent introduction to some SQL and parameterized queries here[^]. It's not a step-by-step "this is how you do it", but it does demonstrate how to run queries.
As for teaching you how to do this, it would take a small book to lay all this stuff out. That's far bigger than any series of forum posts would allow for...
|
|
|
|
|
I don't think this would even compile ? I think he's trying to call getdate in VB, when I told him yesterday it's a function inside SQL Server.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Yeah, it's not looking good at all. I'd scrap all the adapter stuff and just go with the hand written data layer since it'd be so small. But, as you've said, you kind of have to know what your doing in either case. Just because it's "drag'n'drop" doesn't mean you can use the stuff without knowing how it works.
|
|
|
|
|
code :
Imports Microsoft.WindowsMobile.Telephony
Dim phone As New Phone
phone.Talk("+1.....", True)
=============================================
That code to dial number using Visual Basic for Pocker PC devices
Haw can I disconnect that dialing from My application And Haw to monitoring the connection to Know it's status whether
Dialing , connected or No connection
|
|
|
|
|
smsm3650 wrote: Haw can I disconnect that dialing from My application
It's "how", not "haw". And I have no idea what you're talking about with this statement.
smsm3650 wrote: monitoring the connection to Know it's status whether
Dialing , connected or No connecti
As far as I can tell, there's nothing in the Mobile 6 API that will allow you to do this.
|
|
|
|
|
But there are many Application making that like Application that can Auto Redile Number
This App. (Pocket Max Redile.cab) can Auto Redile and Vibrating when Connected ... How it Done ???
|
|
|
|
|
I have no idea considering I don't do any mobile development. I just looked through the SDK documentation and didn't see anything that would suggest functionality like you want. I don't have any hardware to test on, so comming up with example code is impossible for me.
You might want to ask this question in the mobile Development[^] forum, since this has nothing to do with VB.NET.
|
|
|
|
|
I have a login form that opens the next form if the login is succesful. Is it possible to have the login window close when the next form is opened? Right now when I close the login form everyhing is closed. I know that it's because the login form is the parent of the new form..(at least i think this is why).
Is there a solution to my problem? Can I open a new form from the login without it being a child to it? or will i have to just hide the login window?
Thanks for any replies
|
|
|
|
|
It sounds like you might have the "Startup form" (in the project's properties) set to be the Login form and the "Shutdown mode" set to "When startup form closes." So then when the Login form closes, the application exits. If this is the case, change the "Shutdown mode" option to be "When last form closes."
|
|
|
|
|
Thanks! Now it works perfectly, i had to chuckle a bit though because of the simplicity of the solution.
|
|
|
|
|
Hello,
I wrote an application that use Micorsoft excel 11.0 (excel 2003). The application is used by ~50 users. The problem is that not in all computers is installed excel 2003 but instead office XP or 97.
The part of the application that is using the excel component crash in those computers. In there a way to add multiple references to different excel version? Something else to sove this problem.
My solution is to write 3 version of my application but is it very complicated essentialy when I need to update the program.
Thank you.
Shay Noy
|
|
|
|
|
It sounds like your application is using early-binding with Excel - there is a reference directly to the DLL in the appication.
Can the application be rewritten to use late-binding and simply use whatever version of Excel is on the client computer?
Yes, this will probably required a great deal of work, but, it may also solve the problem.
I encountered a similar problem with Micrsoft ActiveX Data objects; my application was referencing a version higher than the end-user had available. So, I used a CreateObject call rather than define the object directly.
Tim
|
|
|
|
|
How can I create an instance of T in next code?
I have this code:
class MyCollection (of T)
inherits Collection(of T)
Public Function CreateInstance As Object
Dim obj as Object
obj = new ???????
...
end sub
end class
Sub MyMethod
dim obj as MyClass
dim adMyDictionary as new adDictionary(of MyClass)
obj = adMyDictionary.CrearInstance
end sub
My question is: How can I create a MyClass instance from CreateInstance method? How can AdDictionary class know the type of its elements during executing time?
|
|
|
|