Showing posts with label lines. Show all posts
Showing posts with label lines. Show all posts

Wednesday, March 28, 2012

Problem with BorderStyle while Exporting to PDF

Hi,
I have lines of BoderStyle: Dotted, BorderWidth: 0.5pt in my report
When I preview it and print it I get the dotted lines
But if I export the same report to PDF and then print I get Dashed lines
instead of Dotted Lines
It's very important that I get Dotted lines.
Can Someone Help me with this
Thanks in Advance
PonnurangamThis is a known issue that will be addressed in a future release.
Unfortunately I do not have a work around to suggest you.
Anyone else?
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
news:OL1Dft%23nEHA.744@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I have lines of BoderStyle: Dotted, BorderWidth: 0.5pt in my report
> When I preview it and print it I get the dotted lines
> But if I export the same report to PDF and then print I get Dashed lines
> instead of Dotted Lines
> It's very important that I get Dotted lines.
> Can Someone Help me with this
> Thanks in Advance
> Ponnurangam
>

Friday, March 23, 2012

Problem with a temp table

For some reason the compiler is telling me that I must declarethe
variable @.costcenter_tmp on lines 74 and 98...but if i put a select
statement in ther (for testing) before the loop I get data back from
the temp table..

why is this happening to this temp table and no others?..heres my
code..its a little lengthy

--Fiscal Year
declare @.year smallint
set @.year = 2004

--Month number the Fiscal year starts and ends
declare @.month smallint
set @.month = 7

--Place holder for number of costcenters
declare @.cccounter smallint

--loop counter for cost centers
declare @.ccount smallint
set @.ccount = 1

--Place holder for number of payor types
declare @.ptcounter smallint

--loop counter for payor types
declare @.pcount smallint
set @.pcount = 1

--Temp table to store the blank values for all cost centers/payor
types for the fiscal year
declare @.Recorded_Revenue_tmp table
(
Revenue money default 0,
[Date] varchar(15),
monthn smallint,
[Cost Center] varchar(50),
[Payor Type] varchar(50)
)

--Temp table to store the values of the coster centers
declare @.costcenter_tmp table
(
ccid int IDENTITY (1,1),
ccname varchar(50)
)

--Inserts cost centers and code into the @.costcenter_tmp temp table
insert into @.costcenter_tmp (ccname) select costcenter.fullname + ' '
+ costcenter.code from costcenter, agency_cost_center
where costcenter.oid = agency_cost_center.cost_center_moniker

--Sets the @.cccounter variable to the number of cost centers
select @.cccounter = count(*) from @.costcenter_tmp

--Temp table to store the values of the payor types
declare @.payor_type_tmp table
(
ptid int identity (1,1),
ptname varchar(50)
)

--Inserts payor types into the @.payor_type_tmp temp table
Insert into @.payor_type_tmp(ptname)select fullname from payor_type
where payor_type.oid = payor.payor_type_moniker

--Sets the @.ptcounter variable to the number of payor types
select @.ptcounter = count(*) from @.payor_type_tmp

--Loop that gets the first part of the fiscal year
While (@.month <13)
begin
--Loop that gets the value of the cost center to insert
While (@.ccount <= @.cccounter)
begin
--Loop that inserts values for the first part of the fiscal year into
the @.Recorded_Revenue_tmp temp table
while (@.pcount <= @.ptcounter)
begin
Insert into @.Recorded_Revenue_tmp(Revenue, [Date], monthn, [Cost
Center],[Payor Type])
select 0, datename(month, @.month)+ ' ' + @.year -1, @.month, [Cost
Center], [Payor Type]
from @.costcenter_tmp,@.payor_type_tmp where @.costcenter_tmp.ccid =
@.ccount and
@.payor_type_tmp.ptid = @.pcount
set @.pcount = @.pcount + 1
end
set @.pcount = 1
set @.ccount = @.ccount + 1
end
set @.ccount = 1
set @.month = @.month + 1
end

set @.month = 1

--Loop that inserts values for the second part of the fiscal year into
the @.Recorded_Revenue_tmp temp table
While (@.month <7)
begin
--Loop that gets the value of the cost center to insert
While (@.ccount <= @.cccounter)
begin
--Loop that inserts values for the first part of the fiscal year into
the @.Recorded_Revenue_tmp temp table
while (@.pcount <= @.ptcounter)
begin
Insert into @.Recorded_Revenue_tmp([Date], monthn, [Cost Center],[Payor
Type])
select 0,datename(month, @.month)+ ' ' + @.year, @.month, [Cost Center],
[Payor Type]
from @.costcenter_tmp, @.payor_type_tmp where @.costcenter_tmp.ccid =
@.ccount and
@.payor_type_tmp.ptid = @.pcount
set @.pcount = @.pcount + 1
end
set @.pcount = 1
set @.ccount = @.ccount + 1
end
set @.ccount = 1
set @.month = @.month + 1
end

--Pulls in all the data for the report
(select Revenue,[Date],[Cost Center],[Payor Type] from
@.Recorded_Revenue_tmp)

union

(select (revenue) as Revenue, (b.monthname + ' ' + Cast(b.yearn as
varchar(4))) as 'Date',
c.fullname + ' ' + c.code as 'Cost Center',d.fullname as 'Payor
Type'

from chr_recorded_revenue a, chr_recorded_revenue_dates b,
costcenter c, payor_type d

where a.date = b.day and a.[Cost Center]= c.oid and a.[Payor Type]
= d.oid)

order by d.fullname,b.monthn, c.oid

thanks..Jim[posted and mailed, please reply in news]

Jim (jim.ferris@.motorola.com) writes:
> For some reason the compiler is telling me that I must declarethe
> variable @.costcenter_tmp on lines 74 and 98...but if i put a select
> statement in ther (for testing) before the loop I get data back from
> the temp table..
> why is this happening to this temp table and no others?..heres my
> code..its a little lengthy
>...

The problem is here:

> from @.costcenter_tmp,@.payor_type_tmp where @.costcenter_tmp.ccid =
===============

You cannot use a table variable as a column prefix. Use an alias instead:

from @.costcenter_tmp, ct @.payor_type_tmp pt where ct.ccid =

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 21, 2012

Problem with @@IDENTITY in stored procedure

Hello !

I just can't access @.@.IDENTITY in my requests !
Here is my stored procedure : (I removed a few lines for clarity)

set ANSI_NULLSONset QUOTED_IDENTIFIERONGOALTER PROCEDURE [dbo].[AssignerLicence](@.Apprenantint = 0)ASBEGINSET NOCOUNT ON;DECLARE @.NBLICENCESintDECLARE @.COMMANDEIDintDECLARE @.LICENCEIDintSET @.NBLICENCES = (SELECTSUM(commande_licences_reste)FROM CommandeWHERE commande_valide = 1)IF@.NBLICENCES > 0BEGINUPDATE CommandeSET commande_licences_reste = (commande_licences_reste - 1)WHERE commande_id =(SELECT TOP 1 C_min.commande_idFROM CommandeAS C_minWHERE C_min.commande_licences_reste > 5ORDER BY C_min.commande_licences_resteASC,C_min.commande_dateASC);SET @.COMMANDEID =@.@.IDENTITYINSERT INTO Licence (licence_date_debut, commande_id)VALUES (GETDATE(), @.COMMANDEID)SET @.LICENCEID =@.@.IDENTITYUPDATE ApprenantSET licence_id = @.LICENCEIDWHERE apprenant_id = @.ApprenantENDEND

But it always throws an error saying that I can't insert null into commande_id (basically, I think @.@.IDENTITY isn't executed at all)

Any idea why it doen't works ?

Thanks !

@.@.IDENTITY returns the last identity value that the currently executing statement created. Since all you are doing with CommandeID is updating, you can't use @.@.Identity. You need to rework your code similar to the following:

SELECT @.COMMANDEID = (SELECT TOP 1 C_min.commande_idFROM CommandeAS C_minWHERE C_min.commande_licences_reste > 5ORDER BY C_min.commande_licences_resteASC,C_min.commande_dateASC);UPDATE CommandeSET commande_licences_reste = (commande_licences_reste - 1)WHERE commande_id = @.COMMANDEID
Then test if it works.

Monday, March 12, 2012

Problem while export report to Excel

When i export a report to Excel, there are created some coluns and line
that not appear in the report.
These lines and coluns are smaller than the normal ones, but if i need to
work with this file, a must have to delete each one.
And athis operation is not easy.
Thanks by your help.
Pedro Julião
Belo Horizonte - Brasil
--
Message posted via http://www.sqlmonster.comI have run into the same problem. I am just building Excel Macros to delete
the columns.
"Pedro Julião Moura Machado Coelho via S" wrote:
> When i export a report to Excel, there are created some coluns and line
> that not appear in the report.
> These lines and coluns are smaller than the normal ones, but if i need to
> work with this file, a must have to delete each one.
> And athis operation is not easy.
> Thanks by your help.
> Pedro Julião
> Belo Horizonte - Brasil
> --
> Message posted via http://www.sqlmonster.com
>|||Dear Eden,
Thanks by your help.
Can you send me some examples of this macros?
Best regards,
Pedro Julião
--
Message posted via http://www.sqlmonster.com