Question : Great Plains-Send Report via EMail as a PDF

When you print a report to the screen in Great Plains 10 you can click Send and attach as TXT file or a PDF file, that is if you have Adobe Acrobat installed.  Is there a way to attach as a PDF without have to have this $300 piece of software?  Doesn't make any since to me to have this software if that is the only this the user is using if for.   I have softwares that I can print to PDF and then attach to an email from Outlook, but I would like to do this through Great Plains.  Does anyone have a work around for this?

Answer : Great Plains-Send Report via EMail as a PDF

Well, I do think it needs the extra checking in there...

So, have a look at :
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
ALTER FUNCTION [dbo].[udf_getrates_3] (@date datetime,@util varchar(50))
RETURNS @tbl table (chargerate MONEY, levy MONEY, caprate MONEY,ChargeCap float, StandingDayCharge money)
AS
BEGIN


  declare @dw char(1)
  set @dw = left(DATENAME(DW, @date),1)

  declare @hr int
  set @hr = datepart(hour,@date)

  insert @tbl 
  select Top 1 --EffectiveStartDate, EffectiveEndDate, 
         CASE WHEN @dw = 'S' and (   (@hr between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend) and isnull(weekenddaycost,0) <> 0)
                                  or (@hr NOT between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend) and isnull(weekendnightcost,0) <> 0))
              THEN
                     CASE WHEN @hr between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend)
                          THEN weekenddaycost
                          ELSE weekendnightcost
                     END
              ELSE 
                     CASE WHEN @hr between datepart(hour,weekdaystart) and datepart(hour,weekdayend)
                          THEN weekdaycost
                          ELSE weeknightcost
                     END
         END , climateChangeLevyRate, ((chargeablecapacity*capacityrate)),chargeablecapacity, isnull(StandingDayCharge,0)
  FROM   EnergySuiteDB.dbo.Rates
  where  UtilityName=@util 
  AND @date between EffectiveStartDate and EffectiveEndDate 
  Order By ID desc    -- get the "last" row that covers the requested date.

  if @@rowcount = 0
     insert @tbl 
     select Top 1 --EffectiveStartDate, EffectiveEndDate, 
         CASE WHEN @dw = 'S' and (   (@hr between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend) and isnull(weekenddaycost,0) <> 0)
                                  or (@hr NOT between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend) and isnull(weekendnightcost,0) <> 0))
              THEN
                     CASE WHEN @hr between datepart(hour,weekenddaystart) and datepart(hour,weekenddayend)
                          THEN weekenddaycost
                          ELSE weekendnightcost
                     END
              ELSE 
                     CASE WHEN @hr between datepart(hour,weekdaystart) and datepart(hour,weekdayend)
                          THEN weekdaycost
                          ELSE weeknightcost
                     END
         END , climateChangeLevyRate, ((chargeablecapacity*capacityrate)),chargeablecapacity, isnull(StandingDayCharge,0)
     FROM EnergySuiteDB.dbo.Rates
     where UtilityName=@util 
     order by EffectiveEndDate desc   -- highest enddate belongs to "row 1" the all covering / default rate.
  return 
END
Random Solutions  
 
programming4us programming4us