Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Tuesday, March 27, 2012

Count occurence of a word

How can I count the rows in wich a specific word occurs in a field in the
detail row of a report?
Thanks
HThere are at least two approaches that come to my mind.
1. Add a caculated field to your dataset that calls a custom VB function
(either embedded in the report or external) which counts the words per row.
Then use the Sum() function to get the overall total.
2. Add a class-level variable to the report embedded code that keeps a
running total. Call a VB function from the field that needs to be counted.
HTH
--
----
Teo Lachev, MVP, MCSD, MCT
Home page and blog: http://www.prologika.com/
----
"Hennie" <spam_me@.linux.com> wrote in message
news:3F608B1B-5F27-4249-912E-0360B60C93FD@.microsoft.com...
> How can I count the rows in wich a specific word occurs in a field in the
> detail row of a report?
> Thanks
> Hsql

Thursday, March 22, 2012

Count "SPECIFIC" characters in a string

How do I count the number of specific characters in a string ?

Example:

declare @.var as varchar(50)
set @.var="1abc1efg1"

If I wanted to count the "1"...I'll get "3" for answer.
This could maybe done by using a while loop, but is there any T-SQL command for this???http://www.dbforums.com/t648578.html

select len(YourCol)-len(replace(YourCol,'1',''))

Tuesday, February 14, 2012

Corrupted PDF attachments

Hi,
I'm running into a problem with PDF attachments on a specific report. It
happens that the attached PDF file is low-sized and Acrobat tells me that the
file is corrupted.
I've tried to apply the following fix on my RS server
http://support.microsoft.com/default.aspx?scid=kb;[LN];872774
But it changed nothing...
Is there another way to fix it ?
I'm using RS SP1 on a WIN2K3 server.
Thanx in advance.In addition to that, i've noticed following line in the log files, when
subscriptions are launched:
ReportingServicesService!chunks!1c08!12/07/2004-07:30:10:: i INFO: ###
GetReportChunk('RenderingInfo_PDF', 2), chunk was not found!
this=90ae42e5-8b6b-49f3-b13f-481b10c2fd93
"Greg - NEOS" wrote:
> Hi,
> I'm running into a problem with PDF attachments on a specific report. It
> happens that the attached PDF file is low-sized and Acrobat tells me that the
> file is corrupted.
> I've tried to apply the following fix on my RS server
> http://support.microsoft.com/default.aspx?scid=kb;[LN];872774
> But it changed nothing...
> Is there another way to fix it ?
> I'm using RS SP1 on a WIN2K3 server.
> Thanx in advance.|||Greg - NEOS wrote:
> I'm running into a problem with PDF attachments on a specific report. It
> happens that the attached PDF file is low-sized and Acrobat tells me that the
> file is corrupted.
If you view the PDF in notepad, do you see an html error near the
bottom? If so, what is that error? Also, take a look at the log files
in the LogFiles directory. Do a search for lines labeled as "e ERROR".
What do you find?
Donovan Smith
--
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Donovan
There's no error visible in the PDF file when i open it with notepad.
There are no errors in the logfiles either.
If it can help, targeted report is a snapshot.
Thanks for you support.
Best Regards,
Grégory.
"Donovan R. Smith [MS]" wrote:
> Greg - NEOS wrote:
> > I'm running into a problem with PDF attachments on a specific report. It
> > happens that the attached PDF file is low-sized and Acrobat tells me that the
> > file is corrupted.
> If you view the PDF in notepad, do you see an html error near the
> bottom? If so, what is that error? Also, take a look at the log files
> in the LogFiles directory. Do a search for lines labeled as "e ERROR".
> What do you find?
> Donovan Smith
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Greg - NEOS wrote:
> There's no error visible in the PDF file when i open it with notepad.
> There are no errors in the logfiles either.
If you render the file to a share vs as an email attachment, is the PDF
still corrupted?
Donovan Smith
--
This posting is provided "AS IS" with no warranties, and confers no rights.|||Donovan,
Files rendered to a share are corrupted too.
I've tried to change execution mode for this report. PDF attachments are
still corrupted when i enable temporary cache copy for this report.
But if i change it to render this report without any cache... everything
goes fine!
We send in PDF format other reports on our server using cache or snapshot
mecanism without problems.
Could it be something in this specific report structure preventing it from
being correctly rendered to a PDF file when report is cached or snapshoted ?
Best Regards,
Gregory.
"Donovan R. Smith [MS]" wrote:
> Greg - NEOS wrote:
> > There's no error visible in the PDF file when i open it with notepad.
> > There are no errors in the logfiles either.
> If you render the file to a share vs as an email attachment, is the PDF
> still corrupted?
> Donovan Smith
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi,
I'm still stuck with those corrupted PDF attachments.
Any Idea ?
Thanks in advance.
Grégory.
"Greg - NEOS" wrote:
> Donovan,
> Files rendered to a share are corrupted too.
> I've tried to change execution mode for this report. PDF attachments are
> still corrupted when i enable temporary cache copy for this report.
> But if i change it to render this report without any cache... everything
> goes fine!
> We send in PDF format other reports on our server using cache or snapshot
> mecanism without problems.
> Could it be something in this specific report structure preventing it from
> being correctly rendered to a PDF file when report is cached or snapshoted ?
> Best Regards,
> Gregory.
> "Donovan R. Smith [MS]" wrote:
> > Greg - NEOS wrote:
> > > There's no error visible in the PDF file when i open it with notepad.
> > > There are no errors in the logfiles either.
> >
> > If you render the file to a share vs as an email attachment, is the PDF
> > still corrupted?
> >
> > Donovan Smith
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >|||Hi,
I'm still stuck with those corrupted PDF attachments.
Any Idea ?
Thanks in advance.
Grégory.
"Greg - NEOS" wrote:
> Donovan,
> Files rendered to a share are corrupted too.
> I've tried to change execution mode for this report. PDF attachments are
> still corrupted when i enable temporary cache copy for this report.
> But if i change it to render this report without any cache... everything
> goes fine!
> We send in PDF format other reports on our server using cache or snapshot
> mecanism without problems.
> Could it be something in this specific report structure preventing it from
> being correctly rendered to a PDF file when report is cached or snapshoted ?
> Best Regards,
> Gregory.
> "Donovan R. Smith [MS]" wrote:
> > Greg - NEOS wrote:
> > > There's no error visible in the PDF file when i open it with notepad.
> > > There are no errors in the logfiles either.
> >
> > If you render the file to a share vs as an email attachment, is the PDF
> > still corrupted?
> >
> > Donovan Smith
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >