Page 1 of 4

Running a stored procedure fails

Posted: Sat Dec 08, 2012 6:01 am
by davids
I have a report that I run with a stored procedure. When editing the data source I can see the expected columns, have entered all the params and can run in the editor and see the results I expect. However, if I have the Type set to Store Procedure, I get an error on this line of code:

Code: Select all

this.rptInvtTransHist.Type = Stimulsoft.Report.Dictionary.StiSqlSourceType.StoredProcedure;

Code: Select all

The error of compilation
The error of compilation is found in the 'Report' report:
Cannot implicitly convert type 'Stimulsoft.Report.Dictionary.StiSqlSourceType' to 'string'
and

Code: Select all

The error of compilation
The error of compilation is found in the 'Report' report:
Property or indexer 'Reports.Report.rptInvtTransHistDataSource.Type' cannot be assigned to -- it is read only
If I set it to run as a table it errors with the first param saying it was not provided.

I did not set this line of code

Code: Select all

this.rptInvtTransHist.Type = Stimulsoft.Report.Dictionary.StiSqlSourceType.StoredProcedure;
and I cannot change it. How do I get the data that shows in the editor to display on the report?

Re: Running a stored procedure fails

Posted: Mon Dec 10, 2012 6:49 am
by Alex K.
Hello,

Can you please send us a sample which reproduces the issue for analysis.

Thank you.

Re: Running a stored procedure fails

Posted: Mon Dec 10, 2012 7:38 pm
by davids
I have compressed the report template and stored procedure using 7z.

This is one report with the issues (you cannot connect to our server so you will have to enter your own credentials.)
mrt with stored procedure.7z
Compressed with 7z
(9.53 KiB) Downloaded 376 times

Re: Running a stored procedure fails

Posted: Tue Dec 11, 2012 7:08 am
by Alex K.
Hello,

We could not reproduce the issue with stored procedure on our database.
Can you please create a simple procedure or database on which reproduce the issue for analysis.

Thank you.

Re: Running a stored procedure fails

Posted: Tue Dec 11, 2012 7:19 am
by davids
so, you were able to "run" the stored procedure? it did not throw an error before hitting the sql db?

Re: Running a stored procedure fails

Posted: Tue Dec 11, 2012 12:26 pm
by Alex K.
Hello,

We could not "run" your procedure because we not have the INVENTOR and other objects which uses in procedure.

Thank you.

Re: Running a stored procedure fails

Posted: Tue Dec 11, 2012 2:58 pm
by davids
That is why I put it in quotes. I realize it would not run. You can clear the contents of the procedure but leave the parameters. On my system, when running the report, it never hits the server to get the data.

Re: Running a stored procedure fails

Posted: Wed Dec 12, 2012 8:20 am
by Alex K.
Hello,

We remove the contents of the procedure and we could not reproduce the issue.
Can you please send us a step by step guide how to reproduce the issue.

Thank you.

Re: Running a stored procedure fails

Posted: Wed Dec 12, 2012 4:19 pm
by davids
Does it make a difference that I see the "Web Preview" and not "Preview" tab?
Image

Here is the line of code:
Image

It appears that we are running different versions

I am running
Image

Re: Running a stored procedure fails

Posted: Wed Dec 12, 2012 4:26 pm
by davids
When I try to run the report I sent you with the stored procedure exactly as I sent it, and the connection string totally wrong (meaning it should throw an error that it can't connect to the server), I still get the same error.

The error HAS to be in the reporting tool. It doesn't even try to connect to my db.

Try these steps in the application I have shown you above:
1. extract the report I provided
2. open the report
3. try to preview it without making any changes (if you get to the failed to connect to the db message, then you are getting different results than me).

That is all I have to do to get the error.