Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

Thursday, March 8, 2012

Chinese Characters in PDF

I have a report that needs to be able to show Chinese characters in a PDF,
any idea how to make it recognize chinese instead of squares and gibberish?Use a font that supports Chinese. The default Arial font does not support
Chinese characters. Use somethikg like Tahoma that supports Chinese
characters.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
news:OW1$wD$cEHA.2352@.TK2MSFTNGP09.phx.gbl...
> I have a report that needs to be able to show Chinese characters in a PDF,
> any idea how to make it recognize chinese instead of squares and
gibberish?
>|||I tried Tahoma and I get question marks in the PDF.
I don't know which other Fonts may support Chinese (etc) is there another I
could try'
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:enrOOv$cEHA.3572@.TK2MSFTNGP10.phx.gbl...
> Use a font that supports Chinese. The default Arial font does not support
> Chinese characters. Use somethikg like Tahoma that supports Chinese
> characters.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> news:OW1$wD$cEHA.2352@.TK2MSFTNGP09.phx.gbl...
> > I have a report that needs to be able to show Chinese characters in a
PDF,
> > any idea how to make it recognize chinese instead of squares and
> gibberish?
> >
> >
>|||Take a look at Asian font packs for PDF on Adobe website.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
news:uPPL6vZdEHA.3392@.tk2msftngp13.phx.gbl...
> I tried Tahoma and I get question marks in the PDF.
> I don't know which other Fonts may support Chinese (etc) is there another
I
> could try'
> "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
> news:enrOOv$cEHA.3572@.TK2MSFTNGP10.phx.gbl...
> > Use a font that supports Chinese. The default Arial font does not
support
> > Chinese characters. Use somethikg like Tahoma that supports Chinese
> > characters.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> > news:OW1$wD$cEHA.2352@.TK2MSFTNGP09.phx.gbl...
> > > I have a report that needs to be able to show Chinese characters in a
> PDF,
> > > any idea how to make it recognize chinese instead of squares and
> > gibberish?
> > >
> > >
> >
> >
>|||Choose Font-family of SimSun will work.
Joe
"Ravi Mumulla (Microsoft)" wrote:
> Take a look at Asian font packs for PDF on Adobe website.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> news:uPPL6vZdEHA.3392@.tk2msftngp13.phx.gbl...
> > I tried Tahoma and I get question marks in the PDF.
> >
> > I don't know which other Fonts may support Chinese (etc) is there another
> I
> > could try'
> >
> > "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
> > news:enrOOv$cEHA.3572@.TK2MSFTNGP10.phx.gbl...
> > > Use a font that supports Chinese. The default Arial font does not
> support
> > > Chinese characters. Use somethikg like Tahoma that supports Chinese
> > > characters.
> > >
> > > --
> > > Ravi Mumulla (Microsoft)
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> > > news:OW1$wD$cEHA.2352@.TK2MSFTNGP09.phx.gbl...
> > > > I have a report that needs to be able to show Chinese characters in a
> > PDF,
> > > > any idea how to make it recognize chinese instead of squares and
> > > gibberish?
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Wednesday, March 7, 2012

checksum_agg and row size error. Require explanation.

Hi,

I can see that by using the object ID rather that the object name, the
following SQL query works. Has anybody got any idea what is causing the
error?

-- Works OK
select o.id
,checksum_agg(binary_checksum(m.text))
from sysobjects o
,syscomments m
where o.id = m.id
and o.xtype in ('FN','IF','P','TF','TR','V')
group by o.id

-- Error
-- Server: Msg 1540, Level 16, State 1, Line 1
-- Cannot sort a row of size 8096, which is greater than the
-- allowable maximum of 8094.
select object_name(o.id)
,checksum_agg(binary_checksum(m.text))
from sysobjects o
,syscomments m
where o.id = m.id
and o.xtype in ('FN','IF','P','TF','TR','V')
group by object_name(o.id)

-- Error
-- Server: Msg 1540, Level 16, State 1, Line 1
-- Cannot sort a row of size 8096, which is greater than the
-- allowable maximum of 8094.
select o.name
,checksum_agg(binary_checksum(m.text))
from sysobjects o
,syscomments m
where o.id = m.id
and o.xtype in ('FN','IF','P','TF','TR','V')
group by o.name

-- Workaround
select getdate()
,object_name(x.id)
,check_sum
from (select m.id
,checksum_agg(binary_checksum(m.text)) as check_sum
from syscomments m
inner join
sysobjects o
on m.id = o.id
where o.xtype in ('FN','IF','P','TF','TR','V')
group by m.id) as x

Regards

LiamUse "OPTION (ROBUST PLAN)":

select o.name
,checksum_agg(binary_checksum(*m.text))
from sysobjects o
,syscomments m
where o.id = m.id
and o.xtype in ('FN','IF','P','TF','TR','V')
group by o.name
OPTION (ROBUST PLAN)

This forces SQL Server to use a plan that works for the maximum
potential row size.

Razvan

Thursday, February 16, 2012

Checking for records where One value is NOT in the other?

I am trying to display results in which a value in my first result table is NOT contained in the second result table. Any idea on how to do this?.

SELECT CUSTOMERID, CUSTOMER FROM TABLE1

WHERE CUSTOMERID NOT IN TABLE2

Code Snippet

select c1.customerid, c1.customer

from table1 c1

left join table2 c2

on c1.customerid = c2.customerid

where c2.customerid is null

|||

Excellent, thanks

Friday, February 10, 2012

Check the sql server service account

Hello!

I would need to check the name of the sql server service account from inside TSQL.

I had one idea about reading from the sysprocesses system table,
but that only gives me information about the SQL Server Agent service account.

Are there other ways?

(It has to work for both SQL Server 2000 and SQL Server 2005.)

Best regards

Ola Hallengren

There is an undocmented approach using 'registry key reading' in SQL Server 2000 version:

xp_regread @.rootkey='HKEY_LOCAL_MACHINE',
@.key='SYSTEM\ControlSet001\Services\SQLServerAgent',
@.value_name='ObjectName'

I'm working onSQL 2005 and will post here once it is successful.