Running a stored procedure fails

Stimulsoft Ultimate discussion
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Running a stored procedure fails

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Running a stored procedure fails

Post by Alex K. »

Hello,

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

Thank you.
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Re: Running a stored procedure fails

Post 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 320 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Running a stored procedure fails

Post 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.
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Re: Running a stored procedure fails

Post by davids »

so, you were able to "run" the stored procedure? it did not throw an error before hitting the sql db?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Running a stored procedure fails

Post 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.
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Re: Running a stored procedure fails

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Running a stored procedure fails

Post 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.
Attachments
Screenshot.png
Screenshot.png (151.39 KiB) Viewed 23631 times
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Re: Running a stored procedure fails

Post 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
davids
Posts: 20
Joined: Sat Dec 08, 2012 5:56 am

Re: Running a stored procedure fails

Post 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.
Post Reply