Showing posts with label interface. Show all posts
Showing posts with label interface. Show all posts

Wednesday, March 28, 2012

InvalidReportParameterException using Data Processing Extensions

We have a report that runs via the data processing extensions. Running this
report from the reporting service interface or via the web is fine.
However, we have a requirement for running this report via some very
speciifc schedules. To achieve this we are programatically rendering this
report. We supply three paramters for this to run. The report runs a stored
procedure to obtain a list of valid periodIds. We pass it a valid period id
(can be found in the list) however, we get the error message below.
Any pointers greatly appreciated.
Steve
*** EXCEPTION: SoapException
*** MSG: System.Web.Services.Protocols.SoapException: Default value or value
provided for the report parameter 'periodId' is not a valid value. -->
Microsoft.ReportingServices.Diagnostics.Utilities.RSException: Default value
or value provided for the report parameter 'periodId' is not a valid value.
-->
Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException:
Default value or value provided for the report parameter 'periodId' is not a
valid value.
at
Microsoft.ReportingServices.ReportProcessing.ParameterInfoCollection.ThrowIfNotValid()
at
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
-- End of inner exception stack traceHi Steve,
I am having a similar problem and I wonder if you figured out what the
problem was...
Thanks,
Ana|||Hi Ana,
It turned out that the problem was one of case sensitivity.
The IDs we were dealing with were all GUIDs. Some of the lists were
uppercase, some were lowercase. As the comparison does not happen in our case
insensitive SQL Server environment, this caused an issue.
Hopefully, any problem you have is just as simple.
Good luck
Steve
"awatanabe@.herald.com" wrote:
> Hi Steve,
> I am having a similar problem and I wonder if you figured out what the
> problem was...
> Thanks,
> Ana
>

Friday, March 9, 2012

'Invalid authorization specification' from IDBInitialize::Initialize (c++)

Hi

I've been trying to connect to my local SQL Server instance (SQL Server 2005) using the SQLNCLI interface from c++ without success. I consistently receive an 'Invalid authorization specification' error (SQL state 28000 and SQL error number 0) when I call IDBInitialize::Initialize to connect to the database. I was hoping someone here could shed some light on this and help me out.

The strange thing is that I get no error if I leave the user blank (L"" in vValue.bstrVal) and try to connect. Also, IDBProperties::SetProperties returns 0 when the user is blank but 40eda when the user is set. This seems to be a message from the pipeline facility but I haven't found the description of the code (0xeda).

The user in the database is configured with no password and I can successfully connect to the server and open the database using that user through Management Studio.

I've also tried using the SQLOLEDB provider with the same results.

Suspecting that I'm setting the properties wrong I include a code snippet below showing how I'm setting the properties:

for (int i = 0; i < sizeof(dbprop) / sizeof(dbprop[0]); i++)
VariantInit(&dbprop[ i ].vValue);

// Server name
dbprop[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
dbprop[0].vValue.vt = VT_BSTR;
dbprop[0].vValue.bstrVal = SysAllocString(L"localhost");
dbprop[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[0].colid = DB_NULLID;

// Database
dbprop[1].dwPropertyID = DBPROP_INIT_CATALOG;
dbprop[1].vValue.vt = VT_BSTR;
dbprop[1].vValue.bstrVal = SysAllocString(L"test");
dbprop[1].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[1].colid = DB_NULLID;

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_INTEGRATED;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

Cheers,
JPProblem solved.

A little bit embarrasing, since I, somehow, misinterpreted the DBPROP_AUTH_INTEGRATED parameter. It should have been DBPROP_AUTH_USERID (of course) instead.

The username propertie now looks like this:

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_USERID;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

and works like a charm.

JP