I have two reports (both have several subreports in them) that will not open up as long as the network connection is active. If I diable the network connection the report will open, then I can restore my network connection and everything works fine until I close the report. This happens on any...
I want a report the shows Part Numbers that have had activity in any one of three date fields that during a date range.
I have the following.
PartNum which is the partnumber..
Date1 which is a partnumber revison date..
Date2 which is the last date the partnumber sold..
Date3 which is the last...
Thank you very much. With a mimor change that did the trick.
Heres what the change looks like for those interested.
CREATE TRIGGER [UpdateVacUsed] ON [dbo].[Absence]
FOR INSERT, UPDATE
AS
Update Employee
set Employee.VacUsed = T.VacTaken
from (select EmpNum, sum(VacTaken) VacTaken from...
I would like to add a filter to a trigger but I am not having any luck at getting it to work.
Here is the filter. It uses the Table Absence and column CurrentYear. I don't know the correct SQL terms to use in the formula but what it does is provide a year based on todays date minus 3 months...
This Trigger works on the Insert and Update but not on the delete. Anyone know how to make it work for a delete also?
CREATE TRIGGER [UpdateVacUsed] ON [dbo].[Absence]
FOR INSERT, UPDATE, DELETE
AS
Update Employee
set Employee.VacTaken = T.VacTaken
from (select EmpNum, sum(VacTaken)...
Changed the code as follows to remove the syntax errors..Also the EmpID was changed to EmpNum and Table TimeOff changed to Absence to match names in the database.
CODE CODE CODE
CREATE TRIGGER [T_VacSickTotal] ON dbo.Absence
FOR INSERT, UPDATE, DELETE
AS
Declare @EmpNum int,
@VacTaken int...
the check syntax produces the following error....
Error 156: Incorrect syntax near the keyword "insert".
Also this looks like it produces a running total, is there a way to use the total/sum of the Column VacTaken in the Table TimeOff
Copied the code as you have, but replacing Emp:VacTaken with Emp:VacUsed.
It does not put a value into the Emp:VacUsed when I Insert a new record in the table timeoff.
What does the T in T.VacTaken represent? Also on the seventh row the T at the end of the row?
Read about stored procedures...
Can a SQL trigger do this?
Hi, I'm new to the whole SQL thing and have been reading about triggers in my SQL books. Hopefully a trigger can do the following but I have no idea on how to properly write it.
I have two tables Employee and TimeOff. (1 to many relation) They are related to each...
Everything was working great UNTIL one of the subreports had a group in it that didn't have a value, no total (no entries in that time frame). This causes the remaining groups values to move up one. The main page formula then puts group 22's value in the group 21 variable and so on.
Dave
Thanks LB..I really appreciate the time and effort you devoted to this.
That works great.
One last thing, is there an "elegant" way to convert the text back to currency/number.
Right now I'm using a second formula to do this.
//@textTOnumber
Tonumber ({@Sub1amt})
It would be nice not to...
Thanks for the info on a "different way" of doing this, but I need the report to match our parent company's report cosmetic wise and the free-placement of the shared variables allow this.
The way I'm doing this now with the 160 subreports works, but is a hard to make changes to. The report...
Sorry if I am not making my problem clear..
My main report is basicaly a blank page. On the main report I am using shared variables that are created from 160 subreports that are placed in the Page Header. The reason for 160 subreports is because there are 40 different groups with 4 different...
Thanks for the reply LB..
Although I haven't had a chance to try your solution, I'm not sure if it is what I need. Will try and create it later today.
I need to get each group total from the subreport, not the grand total of all groups to my main report by the use of a variable. This would be...
Using Crystal Reports 9 - SQL 2000 Database...
I have several hundred "accounts" which contain a date, account# and amount. I have used the Select statement to break these accounts into groups as follows.
//{@MakeAcct}
Select {Account}
Case "1001", "1005", "1006":
"Supplies"
Case...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.