Temp Tables in Simulsoft Report

Stimulsoft Reports.NET discussion
Post Reply
Tom7
Posts: 21
Joined: Wed Mar 24, 2010 5:22 am
Location: Belfast

Temp Tables in Simulsoft Report

Post by Tom7 »

Hi All

Is there any way of being able to create a Temp Table from within the SQL in a Stimulsoft Report, with SQL Syntax such as CREATE TABLE ##Temp

I need add columns to a temp table based on the results of another SQL query, and have it working perfectly in SQL Management Studio, but when out into the SQL area of Stimulsoft I get an error on the Temp Table

I cannot use DECLARE @Temp TABLE.... syntax as with this type of table variable, I was having trouble adding columns to it using ALTER TABLE @Temp ADD NewColumnName VARCHAR(100)

Anyone any ideas?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Temp Tables in Simulsoft Report

Post by Jan »

Hello,

Sql data source based on standard ADO.Net sql query. For MS SQL database we use standard SqlDataAdapter class. All queries which accept this class, will be accepted by our product. Also i need specify that we use SelectCommand property of this class. If you need run something more you can use code similar to

http://social.msdn.microsoft.com/forums ... 27e970f31/

in one of event of report. For example in BeginRenderEvent of report.

Thank you.
User avatar
Hessam8008
Posts: 10
Joined: Sat Jun 27, 2015 10:40 am

Re: Temp Tables in Simulsoft Report

Post by Hessam8008 »

Hello,
I have same problem. Temp tables are used in stored procedures and work properly with "SqlDataAdapter", however, when It calls by StimulReport, an error occurred that refers to the temp table!!
I do not know why StimulReport checks stored procedure's syntax while SQL has accepted that procedure !?

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Temp Tables in Simulsoft Report

Post by Alex K. »

Hello,

Please clarify which version you are use?
Also please check the last build, we made some improvements and checks in that direction.

Thank you.
User avatar
Hessam8008
Posts: 10
Joined: Sat Jun 27, 2015 10:40 am

Re: Temp Tables in Simulsoft Report

Post by Hessam8008 »

Hello,

I use Stimulsoft Reports.Net version 2015.1 and Visual studio 2010.
You are right. It is related to TableAdapter Configuration. So, I added below code after 'AS' in stored procedure and solve the problem

IF 1=0 BEGIN
SET FMTONLY OFF
END

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Temp Tables in Simulsoft Report

Post by HighAley »

Hello.

We are glad to help you.
Let us know if you need any additional help.

Thank you.
User avatar
Hessam8008
Posts: 10
Joined: Sat Jun 27, 2015 10:40 am

Re: Temp Tables in Simulsoft Report

Post by Hessam8008 »

Hello,

That's kind of you.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Temp Tables in Simulsoft Report

Post by Alex K. »

Hello,

Let us know if you need any additional help.

Thank you.
Post Reply