Showing posts with label datatype. Show all posts
Showing posts with label datatype. Show all posts

Monday, March 19, 2012

Invalid Data Type error with Subreports

I have a report with two subreports. The parameter connecting the report with the subreports is based on a field with a datatype of UniqueIdentifier.

If I run each of the subreports by themselves, entering in value for the parameter, they run fine.

When I try to run the master report, it runs, but the subreport sections contain the following text instead of the correct output: "Error: Subreport could not be shown." The Output window shows 2 warning, one for each subreport:

The expression use in subreport 'subreport1' returned a data type that is not valid.

I don't know for a fact that it is the parameter causing the problem, because the error message has a blank for the expression that is having the problem.

Each subreport is a simple table with one column containing string fields from a simple query.

Anyone have any ideas?It sounds like you are trying to pass GUIDs as parameters to the subreport.
On the subreport parameters dialog, use the CStr(...) function to convert the Guids to strings. E.g. =CStr(Fields!GuidColumn.Value)

-- Robert|||Guys:

I am having the same problem. I tried the CStr() function on the parameters to the SubReport, but had the same result. Any more ideas?

Thanks,
Mike|||Whoops! I am getting a different error when using the CStr() function:

Cast from type 'Guid' to type 'String' is not valid.

|||

I think I originally tried Robert's suggestion and was still giving an error like you found.

What I ended up doing was going into the queries for both the master and sub report and using "(CAST ScriptID AS varchar(255))" in the queries themselves. Then, these string fields linked up without a problem.

Gregg

|||Sorry, I meant using =Fields!GuidColum.Value.ToString() to convert it into a string. Anyway, the CAST in the query is also fine.

-- Robert

Invalid Data Type error with Subreports

I have a report with two subreports. The parameter connecting the report with the subreports is based on a field with a datatype of UniqueIdentifier.

If I run each of the subreports by themselves, entering in value for the parameter, they run fine.

When I try to run the master report, it runs, but the subreport sections contain the following text instead of the correct output: "Error: Subreport could not be shown." The Output window shows 2 warning, one for each subreport:

The expression use in subreport 'subreport1' returned a data type that is not valid.

I don't know for a fact that it is the parameter causing the problem, because the error message has a blank for the expression that is having the problem.

Each subreport is a simple table with one column containing string fields from a simple query.

Anyone have any ideas?It sounds like you are trying to pass GUIDs as parameters to the subreport.
On the subreport parameters dialog, use the CStr(...) function to convert the Guids to strings. E.g. =CStr(Fields!GuidColumn.Value)

-- Robert|||Guys:

I am having the same problem. I tried the CStr() function on the parameters to the SubReport, but had the same result. Any more ideas?

Thanks,
Mike|||Whoops! I am getting a different error when using the CStr() function:

Cast from type 'Guid' to type 'String' is not valid.

|||

I think I originally tried Robert's suggestion and was still giving an error like you found.

What I ended up doing was going into the queries for both the master and sub report and using "(CAST ScriptID AS varchar(255))" in the queries themselves. Then, these string fields linked up without a problem.

Gregg

|||Sorry, I meant using =Fields!GuidColum.Value.ToString() to convert it into a string. Anyway, the CAST in the query is also fine.

-- Robert

Invalid Data Type error with Subreports

I have a report with two subreports. The parameter connecting the report with the subreports is based on a field with a datatype of UniqueIdentifier.

If I run each of the subreports by themselves, entering in value for the parameter, they run fine.

When I try to run the master report, it runs, but the subreport sections contain the following text instead of the correct output: "Error: Subreport could not be shown." The Output window shows 2 warning, one for each subreport:

The expression use in subreport 'subreport1' returned a data type that is not valid.

I don't know for a fact that it is the parameter causing the problem, because the error message has a blank for the expression that is having the problem.

Each subreport is a simple table with one column containing string fields from a simple query.

Anyone have any ideas?It sounds like you are trying to pass GUIDs as parameters to the subreport.
On the subreport parameters dialog, use the CStr(...) function to convert the Guids to strings. E.g. =CStr(Fields!GuidColumn.Value)

-- Robert|||Guys:

I am having the same problem. I tried the CStr() function on the parameters to the SubReport, but had the same result. Any more ideas?

Thanks,
Mike|||Whoops! I am getting a different error when using the CStr() function:

Cast from type 'Guid' to type 'String' is not valid.

|||

I think I originally tried Robert's suggestion and was still giving an error like you found.

What I ended up doing was going into the queries for both the master and sub report and using "(CAST ScriptID AS varchar(255))" in the queries themselves. Then, these string fields linked up without a problem.

Gregg

|||Sorry, I meant using =Fields!GuidColum.Value.ToString() to convert it into a string. Anyway, the CAST in the query is also fine.

-- Robert

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thankseran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
.

>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
size[vbcol=seagreen]
http://support.microsoft.com/?[vbcol=seagreen]
>
>.
>|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...[vbcol=seagreen]
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> of the log file?
> size
> http://support.microsoft.com/?|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.

>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
we[vbcol=seagreen]
model[vbcol=seagreen]
Invalid[vbcol=seagreen]
>
>.
>|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...[vbcol=seagreen]
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
>
> kbid=821334
> we
> model
> Invalid

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thankseran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
.
>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
>> Problem with dsigning tables. when changing datatype,
size
>> etc'
>> i get message:
>> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
>> cursor state
>> microsoft is reffering to:
http://support.microsoft.com/?
>> kbid=831997
>> but there is nothing there that can fix the problem
>> what can i do to fix it?
>> Thanks
>
>.
>|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> >--Original Message--
> >eran,shalom
> >Check out if the log file is full, what is recovery model
> of the log file?
> >
> >
> ><eranv@.gat.co.il> wrote in message
> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> >> Problem with dsigning tables. when changing datatype,
> size
> >> etc'
> >> i get message:
> >> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> >> cursor state
> >>
> >> microsoft is reffering to:
> http://support.microsoft.com/?
> >> kbid=831997
> >> but there is nothing there that can fix the problem
> >> what can i do to fix it?
> >>
> >> Thanks
> >
> >
> >.
> >|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.
>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
>> Uri hi and thanks for responding,
>> The log file is not full and the mode is set to "simple"
>> this error occurs on all tables and in every database. I
>> think it has something to do with hotfix or patch that
we
>> installed after sp3a
>> we are working around that problem by recreating the
>> tables everytime a change is needed. you can imagin how
>> hard it is to work like that.
>> thanks again
>> Eran
>> .
>>
>> >--Original Message--
>> >eran,shalom
>> >Check out if the log file is full, what is recovery
model
>> of the log file?
>> >
>> >
>> ><eranv@.gat.co.il> wrote in message
>> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
>> >> Problem with dsigning tables. when changing datatype,
>> size
>> >> etc'
>> >> i get message:
>> >> ODBC error: [Microsoft][ODBC SQL Server Driver]
Invalid
>> >> cursor state
>> >>
>> >> microsoft is reffering to:
>> http://support.microsoft.com/?
>> >> kbid=831997
>> >> but there is nothing there that can fix the problem
>> >> what can i do to fix it?
>> >>
>> >> Thanks
>> >
>> >
>> >.
>> >
>
>.
>|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
> >--Original Message--
> >Eran
> >I see, have you looked at http://support.microsoft.com/?
> kbid=821334
> >Do you have the same MDAC on the client and server?
> >
> >
> ><anonymous@.discussions.microsoft.com> wrote in message
> >news:acf101c48834$30264d70$a601280a@.phx.gbl...
> >> Uri hi and thanks for responding,
> >> The log file is not full and the mode is set to "simple"
> >> this error occurs on all tables and in every database. I
> >> think it has something to do with hotfix or patch that
> we
> >> installed after sp3a
> >> we are working around that problem by recreating the
> >> tables everytime a change is needed. you can imagin how
> >> hard it is to work like that.
> >> thanks again
> >> Eran
> >> .
> >>
> >>
> >> >--Original Message--
> >> >eran,shalom
> >> >Check out if the log file is full, what is recovery
> model
> >> of the log file?
> >> >
> >> >
> >> ><eranv@.gat.co.il> wrote in message
> >> >news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> >> >> Problem with dsigning tables. when changing datatype,
> >> size
> >> >> etc'
> >> >> i get message:
> >> >> ODBC error: [Microsoft][ODBC SQL Server Driver]
> Invalid
> >> >> cursor state
> >> >>
> >> >> microsoft is reffering to:
> >> http://support.microsoft.com/?
> >> >> kbid=831997
> >> >> but there is nothing there that can fix the problem
> >> >> what can i do to fix it?
> >> >>
> >> >> Thanks
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >

Invalid cursor state

Problem with dsigning tables. when changing datatype, size
etc'
i get message:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
cursor state
microsoft is reffering to: http://support.microsoft.com/?
kbid=831997
but there is nothing there that can fix the problem
what can i do to fix it?
Thanks
eran,shalom
Check out if the log file is full, what is recovery model of the log file?
<eranv@.gat.co.il> wrote in message
news:369601c48812$bb6d5530$a301280a@.phx.gbl...
> Problem with dsigning tables. when changing datatype, size
> etc'
> i get message:
> ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid
> cursor state
> microsoft is reffering to: http://support.microsoft.com/?
> kbid=831997
> but there is nothing there that can fix the problem
> what can i do to fix it?
> Thanks
|||Uri hi and thanks for responding,
The log file is not full and the mode is set to "simple"
this error occurs on all tables and in every database. I
think it has something to do with hotfix or patch that we
installed after sp3a
we are working around that problem by recreating the
tables everytime a change is needed. you can imagin how
hard it is to work like that.
thanks again
Eran
..

>--Original Message--
>eran,shalom
>Check out if the log file is full, what is recovery model
of the log file?[vbcol=seagreen]
>
><eranv@.gat.co.il> wrote in message
>news:369601c48812$bb6d5530$a301280a@.phx.gbl...
size[vbcol=seagreen]
http://support.microsoft.com/?
>
>.
>
|||Eran
I see, have you looked at http://support.microsoft.com/?kbid=821334
Do you have the same MDAC on the client and server?
<anonymous@.discussions.microsoft.com> wrote in message
news:acf101c48834$30264d70$a601280a@.phx.gbl...[vbcol=seagreen]
> Uri hi and thanks for responding,
> The log file is not full and the mode is set to "simple"
> this error occurs on all tables and in every database. I
> think it has something to do with hotfix or patch that we
> installed after sp3a
> we are working around that problem by recreating the
> tables everytime a change is needed. you can imagin how
> hard it is to work like that.
> thanks again
> Eran
> .
>
> of the log file?
> size
> http://support.microsoft.com/?
|||yes the MDAC versions are the same. the error message
occurs also when working directly on the server.
a general search led me to http://support.microsoft.com/?
kbid=831997
and i think that the link discribes an issue somewhat
relevant, however i could not find a workaround or hotfix
to correct the problem.

>--Original Message--
>Eran
>I see, have you looked at http://support.microsoft.com/?
kbid=821334[vbcol=seagreen]
>Do you have the same MDAC on the client and server?
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:acf101c48834$30264d70$a601280a@.phx.gbl...
we[vbcol=seagreen]
model[vbcol=seagreen]
Invalid
>
>.
>
|||Eran
You may want to delete the hotfix and re-install sp3.
<anonymous@.discussions.microsoft.com> wrote in message
news:ad1f01c4883a$cd180280$a601280a@.phx.gbl...[vbcol=seagreen]
> yes the MDAC versions are the same. the error message
> occurs also when working directly on the server.
> a general search led me to http://support.microsoft.com/?
> kbid=831997
> and i think that the link discribes an issue somewhat
> relevant, however i could not find a workaround or hotfix
> to correct the problem.
> kbid=821334
> we
> model
> Invalid