Seal Report Forum
»
General
»
General Discussions/Other
»
Creating a Report using Stored procedure
Rank: Newbie
Groups: Registered
Joined: 8/1/2022(UTC) Posts: 0 Location: india
|
Hi all, Can anyone tellme the steps to follow to create a new report using the stored procedure, I tried to execute an SP inside the table, and it throws incorrect syntax near '1' whereas the query is OPENROWSET('SQLNCLI', 'Server=sample02;Database=Fresh_DB_V02;user id=s*;password=abc123=0; Trusted_Connection=yes','EXEC sp_sample_GetAll'{CommonRestriction_Label1}'') after execution it throws the error as Incorrect syntax near '1'. SELECT * FROM ( OPENROWSET('SQLNCLI', 'Server=sample02;Database=Fresh_DB_V02;user id=sa;password=abc123=0; Trusted_Connection=yes','EXEC sp_sample_GetAll'1=1'') ) test WHERE 1=0 can anyone help me with the steps to follow Edited by user Tuesday, August 2, 2022 9:23:41 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
did you check the sample SQL-Server\401-SQL Server Stored Procedures with parameters ?
you should define a table in your data source having the Name: OPENROWSET('SQLNCLI', 'Server=sample02;Database=Fresh_DB_V02;user id=s*;password=abc123=0; Trusted_Connection=yes','EXEC sp_sample_GetAll'{CommonRestriction_Label1}'')
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/1/2022(UTC) Posts: 0 Location: india
|
Originally Posted by: epf did you check the sample SQL-Server\401-SQL Server Stored Procedures with parameters ?
you should define a table in your data source having the Name: OPENROWSET('SQLNCLI', 'Server=sample02;Database=Fresh_DB_V02;user id=s*;password=abc123=0; Trusted_Connection=yes','EXEC sp_sample_GetAll'{CommonRestriction_Label1}'') Hi epf, thanks for your reply I have executed the 401 sample and set the filter as null due to expecting filter parameter and it was executed successfully, then i gor a new error as below This report demontrates the use of the result set returned by a stored procedure in a local SQL Server. Note that to use OPENROWSET to define your table, you must configure your SQL Server with the following commands: where as am using :sql server 2016 and seal report is 6.6 exec sp_configure 'show advanced options', 1; RECONFIGURE; exec sp_configure 'Ad Hoc Distributed Queries', 1; RECONFIGURE; •2 Tasks to create a dummy SP in SQL Server •test 1 Model: Use of the custom table 'sp_testSR' defined with 'OPENROWSET' and a 'Common Restriction' Label1 •test 2 Model: Direct call of the SP with a SQL Model configured with the 'Use Raw SQL' set to true and a 'Common Restriction' Label2 •test 3 Model: Use of the custom temporary table 'tempTestSR' created in the 'Pre SQL Statement' and a 'Common Restriction' Label3. where am a beginner to use seal report, it would be much helpful
|
|
|
|
Seal Report Forum
»
General
»
General Discussions/Other
»
Creating a Report using Stored procedure
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.