Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Sunday, February 19, 2012

Attempted to divide by zero

I have the following expression as a Calculated Field:
=IIf(Fields!PROJ_Y.Value <> 0 Or Not Fields!PROJ_Y.Value Is Nothing,
((Fields!PROJ_Y.Value-Fields!ACTUAL_Y1.Value)/Fields!PROJ_Y.Value),
0)
and I get the error "The Value expression for the field â'GROWTH_Yâ' contains
an error: Attempted to divide by zero." when I run the report. Obviously the
If statement is written to avoid the division by zero, so I am not sure how
this would happen.
BJI was able to resolved this issue by writing a custom function to handle the
division instead of the IIf statement.
BJ
"bjkaledas" wrote:
> I have the following expression as a Calculated Field:
> =IIf(Fields!PROJ_Y.Value <> 0 Or Not Fields!PROJ_Y.Value Is Nothing,
> ((Fields!PROJ_Y.Value-Fields!ACTUAL_Y1.Value)/Fields!PROJ_Y.Value),
> 0)
> and I get the error "The Value expression for the field â'GROWTH_Yâ' contains
> an error: Attempted to divide by zero." when I run the report. Obviously the
> If statement is written to avoid the division by zero, so I am not sure how
> this would happen.
> BJ|||I think you just needed to replace the 'Or' with an 'And'
~ Magendo_man
"bjkaledas" wrote:
> I was able to resolved this issue by writing a custom function to handle the
> division instead of the IIf statement.
> BJ
> "bjkaledas" wrote:
> > I have the following expression as a Calculated Field:
> >
> > =IIf(Fields!PROJ_Y.Value <> 0 Or Not Fields!PROJ_Y.Value Is Nothing,
> > ((Fields!PROJ_Y.Value-Fields!ACTUAL_Y1.Value)/Fields!PROJ_Y.Value),
> > 0)
> >
> > and I get the error "The Value expression for the field â'GROWTH_Yâ' contains
> > an error: Attempted to divide by zero." when I run the report. Obviously the
> > If statement is written to avoid the division by zero, so I am not sure how
> > this would happen.
> >
> > BJ

Thursday, February 9, 2012

attach some extra pdf documents ?

how do I add some extra pdf documents into my report pages it depends on db
bit field value ?
regards
ilkerYou cant add directly instead you can provide a hyperlink where by users will
click and get the PDF.
Amarnath, MCTS
"ilker tiryaki" wrote:
> how do I add some extra pdf documents into my report pages it depends on db
> bit field value ?
> regards
> ilker|||On Mar 12, 3:30 am, ilker tiryaki
<ilkertiry...@.discussions.microsoft.com> wrote:
> how do I add some extra pdf documents into my report pages it depends on db
> bit field value ?
> regards
> ilker
If you are needing to have a portion of the report to export to PDF
based on a bit field in the database, you can either use a subreport
in the report that only returns data for cases of the bit field being
set -or- do the same with a table in the report. I think you should be
able to toggle the visibility based on the dataset that will populate
this extra section. If you are looking to just include external PDF
documents, I believe that Amarnath is correct.
Regards,
Enrique Martinez
Sr. SQL Server Developer