Showing posts with label switch. Show all posts
Showing posts with label switch. Show all posts

Friday, March 9, 2012

Divide by Zero

Dear all,

I have a formula as below:

=switch(A=0,"Black",B/switch(A,1,A)*100>0,"Black",B/switch(A,1,A)*100<0,"Red")

I use this formula to get rid of the "divide by zero" error, anyway, i get another error which isArgument 'VarExpr' is not a valid value instead of

Attempted to divide by zero after applying the above formula.

Does anyone have any ideas?

Thanks

Levine

Hi,

From your description, it seems that you met the "divided by zero" in your report, right?

If so, I think you should use IIF function to check the value first, and then, decide if it could be divide in the expression. See the following code:

=IIF(Fields!Deno.Value = 0, "N/A", (Fields!MyType.Value) / IIf(Fields!Deno.Value = 0, 1, Fields!Deno.Value))

Thanks.

Friday, February 24, 2012

Distribution cleanup

I would love to be able to run the distribution cleanup job with a switch that says cleanup all distributed transactions.

Because when I use peer to peer replication the @.allow_initialize_from_backup publication property is set to true which is good. But it has the down side that transactions are stored the max retention period in the distribution database. I want to use the deafault 72 hours for my retention period so that the subscritions don't get deactivated but in a system with a high transaction rate there wil be a lot of transactions in 72 hours. This means that the cleanup job will have a tough time to figure out which transactions to delete so the cleanup job will run for a long time not a very big problem but the problem is that the cleanup job will keep the log reader agent from delivering trtansactions to the distribution database and the subscribers won't get their data in time.

Could Microsoft please give me a switch so I can choose when I want to save my transaction and when I want to delete them as soon as they have been delivered to all subscribers?

Is this a feature in SQL Server 2008? Could it be released in SP3 for SQL Server 2005. (The SP 2 cleanup job has a bug so I have to use the SP 1 verison of the cleanup job)

just out of curiosity what is the bug in SP2 cleanup job? Do you happen to have a bug number or description, i can look it up and see if there's a workaround for your problem.|||

I don't have the bug number My tech lead at Microsoft will come back to me when the dev team has made the correction. The workaround I use is to run the SP1 versions of some cleanup procs.

This workaround atleast lets me delete the records older than max retention.

But I still would lit to be able to give two dates to the cleanup job. One for checking the subscription deactivation and one for transaction cleanup.

Sunday, February 19, 2012

distributing reports to multiple report servers

Hi,
I am trying to figure out how to package and deploy reports to multiple
report servers. We have 200+ clients, and are trying to switch over to
report server, but I can't find any documentation about deploying reports
outside of an organization.
To clarify a little, new releases come out quarterly, and are installed with
an msi installer, and we would like to be able to distribute reports with
our current process.
any help would be greatly appreciated...
Thanks
CraigCraig,
There is a sample script that shows how to automate the publishing of
the reports. Is this the kind of thing you're looking for?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_sampleapps_v1_1apd.asp
Your msi installer could land the report rdl and collect the variables
necessary for running a script similar to this.
Andy Potter|||That should do just fine =)
Thanks,
Craig
"Potter" <drewpotter@.gmail.com> wrote in message
news:1135889173.574650.189300@.g43g2000cwa.googlegroups.com...
> Craig,
> There is a sample script that shows how to automate the publishing of
> the reports. Is this the kind of thing you're looking for?
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_sampleapps_v1_1apd.asp
> Your msi installer could land the report rdl and collect the variables
> necessary for running a script similar to this.
> Andy Potter
>|||To help automate the script generation have a look at
Reporting Services Scripter
http://www.sqldbatips.com/showarticle.asp?ID=62
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Craig L" <craig.lonsbury@.diamondmunicipal.com> wrote in message
news:eShO$RLDGHA.516@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I am trying to figure out how to package and deploy reports to multiple
> report servers. We have 200+ clients, and are trying to switch over to
> report server, but I can't find any documentation about deploying reports
> outside of an organization.
> To clarify a little, new releases come out quarterly, and are installed
> with an msi installer, and we would like to be able to distribute reports
> with our current process.
> any help would be greatly appreciated...
> Thanks
> Craig
>