Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Thursday, March 22, 2012

Data drive subscritpion sQL2000- Hide parameter for email recipien

Hi,
I am looking for a way to hide the parameter input fields in the report. I
want to avoid that customer could modify his assigned parameter. If I disable
option in report property "prompt for user" (I have German version
"Eingabeaufforderung für Benutzer") I cannot assign parameter from my "data
driven" source.
Thanks for help.Hi,
I would "normally" get what I want if I attach report to mail and not the
link. But everytime I try this the scheduled execution fails. If I try it
with a simple test report it works fine. In My report I use a dynamic MDX
query like
="With meber..." & Parameters!Para1.Value & ...
Maybe here is the issue?
"mathiasr" wrote:
> Hi,
> I am looking for a way to hide the parameter input fields in the report. I
> want to avoid that customer could modify his assigned parameter. If I disable
> option in report property "prompt for user" (I have German version
> "Eingabeaufforderung für Benutzer") I cannot assign parameter from my "data
> driven" source.
> Thanks for help.|||I found it myself:
I need a domain user instead of sql authentication (sa user) in the
datasource property. Then the execution of report works unattended and can be
emailed.
"mathiasr" wrote:
> Hi,
> I would "normally" get what I want if I attach report to mail and not the
> link. But everytime I try this the scheduled execution fails. If I try it
> with a simple test report it works fine. In My report I use a dynamic MDX
> query like
> ="With meber..." & Parameters!Para1.Value & ...
> Maybe here is the issue?
> "mathiasr" wrote:
> > Hi,
> >
> > I am looking for a way to hide the parameter input fields in the report. I
> > want to avoid that customer could modify his assigned parameter. If I disable
> > option in report property "prompt for user" (I have German version
> > "Eingabeaufforderung für Benutzer") I cannot assign parameter from my "data
> > driven" source.
> > Thanks for help.

Monday, March 19, 2012

Data Conversion failed due to Potential Loss of data

Hi,

I am getting this error when my ssis package is running

Data Conversion failed due to Potential Loss of data

the input column is in string format and output is in sql server bigint

the error is occuring when there is an empty string in the input. what should i do to overcome this

It is an ID field and should i convert to bigint or should i leave it as char datatype is it i a good solution or is there a way to over come this.

Add a derived column to either change the empty string to NULL or a zero. Up to you, but you can't insert a string into an integer field.|||

I am not sure why a string is being passed into a BigInt but I would not leave an input field null. I would use the Conditional operator ? : to provide the empty string a value of 0 if it is empty using the following in an expression:

ISNULL(<<input field>>) ? 0 : <<input field>>

In other words the above states that if the incoming field is NULL then fill it with a 0 otherwise pass the incoming value.

|||

desibull wrote:

I am not sure why a string is being passed into a BigInt but I would not leave an input field null. I would use the Conditional operator ? : to provide the empty string a value of 0 if it is empty using the following in an expression:

ISNULL(<<input field>>) ? 0 : <<input field>>

In other words the above states that if the incoming field is NULL then fill it with a 0 otherwise pass the incoming value.

NULL and "empty string" are two very different things.

To expand on what I suggested earlier and desibull's code above:

ISNULL([InputColumn]) || [InputColumn] == "" ? 0 : [InputColumn]

OR

ISNULL([InputColumn]) || [InputColumn] == "" ? NULL(DT_I8) : [InputColumn]