Jump to content
Xtreme .Net Talk

igloo iguana

Members
  • Posts

    11
  • Joined

  • Last visited

About igloo iguana

  • Birthday 05/02/1967

Personal Information

  • Visual Studio .NET Version
    Visual Studio.NET
  • .NET Preferred Language
    VB.NET

igloo iguana's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Go here: http://www.madladdesigns.co.uk/vbcodebook/index.htm and download the program - VBCodeBook.NET. It has a bunch of code snippets and one of them tells you exactly how to do that. :)
  2. I had someone tell me about this (value.date) thing so I tried it and it worked. selectFormula = "{Ticket.Flight_date} >= #" & monthPicker.Value.Date & "# And {Ticket.Flight_date} <= #" & monthPicker2.Value.Date & "# And {Customer.Customer_ID} = " & cboCustomerSSN.Text & " " I am going to try your code tomorrow. I want to see if the month is any different than the date. Thanks;) Dim frmCustomerSummary As New frmCustomerSummary() frmCustomerSummary.Show() Dim report As New ReportDocument() Dim selectFormula As String Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo Try report.Load("..\CrystalReport_customer_month.rpt") For Each tbCurrent In report.Database.Tables tliCurrent = tbCurrent.LogOnInfo With tliCurrent.ConnectionInfo .ServerName = "someservername" .UserID = "someuserid" .Password = "somepassword" .DatabaseName = "somedatabasename" End With tbCurrent.ApplyLogOnInfo(tliCurrent) Next tbCurrent selectFormula = "{Ticket.Flight_date} >= #" & monthPicker.Value.Date & "# And {Ticket.Flight_date} <= #" & monthPicker2.Value.Date & "# And {Customer.Customer_ID} = " & cboCustomerSSN.Text & " " report.DataDefinition.RecordSelectionFormula = selectFormula frmCustomerSummary.CrystalReportViewer1.ReportSource = report frmCustomerSummary.CrystalReportViewer1.Zoom(100) Catch Exp As LoadSaveReportException MsgBox("Crystal Reports has failed to load please try again.", MsgBoxStyle.Critical, "ERROR") Catch Exp As Exception MsgBox(exp.Message, MsgBoxStyle.Critical, "ERROR") End Try
  3. I found out that all I needed to do was add .text to my datepicker like this selectFormula = "{Ticket.Flight_date} = #" & datetimepicker.Text & "# " worked fine after I changed that
  4. I have a database that has a date column. I have a form that has a date picker on it. I want to use the date picker to pull all files from the month chosen. The date format in the database is 01/01/2003 The date picker format is 01/01/2003 How do I get all the files within the month? This is a reservation system and I need to list all reservations that happened within the month selected. Thanks p.s. i kinda need this pretty fast also. :D
  5. You can hardcode that information into your program. I could try and help you if you want. There is a sample program that is with the 101 VB.NET samples called (VB.NET - Windows Forms - Use Crystal Reports) you can download here http://msdn.microsoft.com/vstudio/downloads/default.aspx That is how I learned how to do it. With a lot of time and more trial and error I finally got it working. Hope this helps. :)
  6. I have a database that has a date field with the date format. I have a form that has the DateTimePicker so the user can select a date to see all the files on that particular date. I could not get anything to work so I made a hidden label that recieves the custom date from the datetimepicker and then passes that value into my sql statement for my crystal report. Anybody have a better way of doing this. MY CODE......................................................................................... Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'loads the date from the datetimepicker into the label at form load time lblHidden.Text = DateTimePicker.Text End Sub 'My custom datetimepicker date format Private Sub DateTimePicker_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker.ValueChanged 'custom format the datetimepicker DateTimePicker.Format = DateTimePickerFormat.Custom ' Display the date as "05/02/2003". DateTimePicker.CustomFormat = "MM/dd/yyyy" ' loads the date from the datetimepicker into the label whenever a new date is selected lblHidden.Text = DateTimePicker.Text End Sub ' this is in my Crystal reports statement selectFormula = "{Ticket.Flight_date} = #" & lblHidden.Text & "# " '' these are things that I tried and they work ' this pulls all tickets 'selectFormula = "{select * from Ticket.Ticket_ID}" ' this works with a literal date hard coded into it 'selectFormula = "{Ticket.Flight_date} = # 5/2/2003 # " Ask me a question if you need clarification Thanks
  7. How did you do that? Could you show me? Thanks
  8. I have found that most people don't know that much about it.
  9. try these sites. the madlabs site has an excellent program that has all kinds of program snippets to learn from. http://www.devcity.net/net/article.aspx?alias=recipebook http://www.vbtutor.net/ http://www.madladdesigns.co.uk/vbcodebook/index.htm http://www.dotnet247.com/247reference/default.aspx
  10. I want to have my message boxes match the color of my forms. Is there a way to do this? Thanks
  11. Does any body know why I can't use the start button to run my program. I can make the simplest program ( i made one that just shows the time ticking away) and if I use the 'Start without debugging' button it will run, BUT as soon as I try it with just pushing the 'Run' button it freezes my whole VB program and I have to CTRL+ALT+DELETE to shut it down and start over. I hope you have an answer. Thanks
×
×
  • Create New...