
hog
Avatar/Signature-
Posts
1011 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by hog
-
Thanks derek, can you tell me more detail please? What I am doing is this: I create a dataset in order to have fields available in design time in crystal reports. When I run the app I have a dynamic dataset which returns the records to be used in the report. When I need to add additional fields to the report I need to modify the design time dataset to make the fields available to the report. Question is how else can I make the required fields available to the report? I have modified the .vb and .xsd files which seems to work in as much as when I select to show the schema I can see all the required fields, but the dataset needs to be generated to allow the fields to become visible to the report. Any ideas??
-
OK some more info on this as I still can't cure it! The error message is identical in both Access and VB .NET if the brackets are omitted from the FROM clause. In Access if I replace the brackets the query works fine. The query builder in VB.NET keeps removing the brackets and thus produces an error even though I save the sql with the brackets. What is gonig on here ?????
-
This is driving me nuts so if anyone out there can help you'll be on my Xmas card list for life! This is the sql generated by the query builder for my oledbadapter: SELECT tblContracts.po_number, tblContracts.price, tblJobs.active, tblJobs.comments, tblJobs.dated, tblJobs.engineer, tblJobs.grn_no, tblJobs.hours, tblJobs.invoice_amount, tblJobs.invoice_date, tblJobs.invoice_no, tblJobs.jobdone, tblJobs.reference, tblJobs.sequence, tblJobs.type, tblContracts.Supplierid, tblContracts.contractid, tblContracts.order_line, tblContracts.pr_number, tblJobs.jobid, tblJobs.duedate, tblEquipment.model, tblEquipment.serial, tblEquipment.type AS equipmenttype FROM tblJobs INNER JOIN tblContracts ON tblJobs.contractid = tblContracts.contractid INNER JOIN tblEquipment ON tblContracts.equipmentid = tblEquipment.equipmentid This produces a missing operator error whilst trying to generate the dataset. If I run the configure dataadapter wizard and amend the FROM statement to this: FROM (tblJobs INNER JOIN tblContracts ON tblJobs.contractid = tblContracts.contractid) INNER JOIN tblEquipment ON tblContracts.equipmentid = tblEquipment.equipmentid It generates the SQL. But if i then attempt to preview the data the error message about missing operator appears again. When I look at the SQL the FROM clause has been modified and the brackets removed. The error appears in the Access query design grid too if the brackets are omitted but with the brackets the SQL returns the correct records. Questions are why is the FROM clause being modified? And why do I get this error every time I try to include three tables in my SQL? :confused: :confused: :confused:
-
I am going through a learning curve with it at the moment and am learning more each day so hopefully I may be able to help out in the future.........
-
This is by no way meant a s a moan just an enquiry. I notice that not many of the posts on Crystal Reports get many replies. Is this because most people think that CR is not strictly VB related or some other reason. Like I say I am not moaning just trying to find out if CR posts should come here or should I be looking elsewhere for CR related issues. Thanks:)
-
Aha, so no problem then if I'm never gonna use C#?
-
OK thanks, but can you explain why you should avoid the microsoft.visualbasic namespace?
-
I am trying to keep a running ttal of hours/minutes spent servicing equipment. I see now there is a Timespan object in .NET. Should I be using this to keep a time total or the Dateadd or Datediff functions.
-
Sorry, :-( I have little knowledge of tooltips as I tend not to use them
-
My approach is this: If an error occurs it is displayed in a form to the user detailing what has happened. The user has a choice of clicking OK to continue using the application, rolled back so they can carry on working with some other part of the system. If it is a critical or persistent error they have the option to send an alert email to the administrator. This email details who sent it, what happened and where and asks the administrator to contact that user as soon as they can.
-
Thanks to you all. I am now confused as to the best approach regarding error trapping. My method to date has been as Heiko states, but Derek has good points too. So who's right and who's wrong?
-
Amen to that! My biological clock goes ape twice a year with this time changing bobbins!!
-
You need to get the bootstapper setup files from the MS site. Have a look at this sites Deployment section as there is plenty of info on this subject there.
-
Try looking at the info on System.Globalization Namespace, you may find something there to help you
-
Sorry, can't help on this! The only time I get tooltips appearing on the report fields is when I am in designer mode. When running the report from within my app there are no tooltips?
-
Create a normal form for your splash form and add a timer to it for however long you want it to stay visible for. When the timer is up close the form
-
Have you got the report referenced directly as the ReportSource property of the viewer or are you using a ReportDocument Component? I'm using the latter and get no tooltips
-
The sql below returns all required fields that I want on my report. The report fields reference each field as tblContracts.pr_number etc and if I use this sql in a dataadapter it returns the data I'd expect. Problem is if I put all these fields on my report I get an error from the crystal reports engine. If I remove the suppliername field from the report it works OK. This field is the only one which comes from another table, but as the data all gets put into a dataset into a table called tblContracts it uses the prefix tblContracts like all the others. Any ideas please as this is driving me nuts!! m_strSQL = "SELECT tblContracts.order_line, tblContracts.pr_number, tblContracts.budget, tblContracts.dept, " & _ "tblContracts.po_number, tblContracts.dated, tblContracts.commencement, tblContracts.expires, " & _ "tblContracts.contact, tblContracts.contact_tel, tblContracts.price, tblContracts.description, " & _ "tblContracts.active, tblContracts.internal, tblContracts.s0, tblContracts.s1, tblContracts.s2, " & _ "tblContracts.s3, tblContracts.s4, tblContracts.s5, tblContracts.s6, tblContracts.s7, tblContracts.s8, " & _ "tblContracts.s9, tblContracts.s10, tblContracts.s11, tblSuppliers.name AS suppliername FROM tblContracts INNER JOIN " & _ "tblSuppliers ON tblContracts.Supplierid = tblSuppliers.supplierid WHERE (tblContracts.po_number = '" & _ strPONumber & "') ORDER BY order_line "
-
Are the tooltips displaying the field names from controls on the form or the report?
-
When I use multiple handlers I use code like this to determine which control called the routine: Private Sub ClickButtons(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click Dim ctlSender as Button = DirectCast(sender, Button) Select Case ctlSender.Name Case "Button1" ' code Case "Button" ' code End Select End Sub
-
Retreiving the schema for oledbadapter failed
hog replied to hog's topic in Database / XML / Reporting
Thanks Nerseus, I agree with you about coding to try save trouble later down the line. Just to confirm you note above do you mean sql like this: SELECT [supplierid], [name], [contractid] FROM tblSuppliers Thnx -
Working With Null Values from the DB
hog replied to MarkItZero's topic in Database / XML / Reporting
Yeah I realised I was quick off the mark with that response after I posted it! I was more making the point that I tend to assgin either Nothing or String.Empty rather than use " " which seems messy. -
Mmm point taken. However I'm using an Access database, not SQL Server so I presume then there is an exception of type Access or something?
-
Working With Null Values from the DB
hog replied to MarkItZero's topic in Database / XML / Reporting
I normally use this approach: txtLocation.Text = IIF(IsDBNull(Cstr(RcrdSt("Location")),Nothing,Cstr(RcrdSt("Location")) -
Retreiving the schema for oledbadapter failed
hog replied to hog's topic in Database / XML / Reporting
OK, got it sorted: m_strSQL = "SELECT tblJobs.duedate, tblJobs.jobdone, tblContracts.po_number, tblSuppliers.name, " & _ "tblContracts.equipmentid, tblEquipment.serial, tblEquipment.model, tblEquipment.type " & _ "FROM ((tblJobs INNER JOIN tblContracts ON tblJobs.contractid = tblContracts.contractid) " & _ "INNER JOIN tblEquipment ON tblContracts.equipmentid = tblEquipment.equipmentid) INNER JOIN " & _ "tblSuppliers ON tblJobs.supplierid = tblSuppliers.supplierid WHERE (((tblJobs.jobdone) = 0))" You were right about the field names, tblJobs and tblEquipment both have a field named Type. The fact that Access did not complain threw me, now I know better.... Thx