Passing parameters to create report using sql connection

Stimulsoft Reports.NET discussion
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Passing parameters to create report using sql connection

Post by nicegaurav »

I have already created report using XML data source. Now want to create it using sql data source with some parameter at run time. On my screen data is coming with the help of SP (stored proc) and I want to show that data on the report.

can you please help me out..

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

Re: Passing parameters to create report using sql connection

Post by HighAley »

Hello.

Please, watch the How to Use Stored Procedure in Designer video on our site.

Thank you.
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: Passing parameters to create report using sql connection

Post by nicegaurav »

Thanks for your reply.. :)
I have created report with the help of SP, but now i am facing another issue. if there are 2-3 parameter in the SP, How can i pass the value of the parameter on the report.

Waiting for your reply ..
Thanks
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: Passing parameters to create report using sql connection

Post by nicegaurav »

I have done this.. :)

Want to open report in PDF directly and using mentioned below code
"StiReportResponse.ResponseAsPdf(this, report1, false); "

but report not displayed :(
Please help me out ..
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Passing parameters to create report using sql connection

Post by Alex K. »

Hello,

Please try to use the report.Render() method. If it is did not help, please send us a sample project which reproduce the issue for analysis.

Thank you.
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: Passing parameters to create report using sql connection

Post by nicegaurav »

Thanks for your reply...

Now the report being display.. and m using databands in it, As per the requirement i have used Crossheader and crossdataBand on databand but it is not displaying me the report...
Can you help me in this issue..
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Passing parameters to create report using sql connection

Post by Alex K. »

Hello,

Please send us your report with test data which reproduces the issue for analysis.

Thank you.
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: Passing parameters to create report using sql connection

Post by nicegaurav »

All the issues are resolved... :)

Now facing some other problem, ------

I have a Stored proc with two parameters and it returns three tables, how can I use these three tables to make the report?
This is urgent, please reply ASAP....

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

Re: Passing parameters to create report using sql connection

Post by Alex K. »

Hello,

Can you please send us a sample procedure for analysis.

Thank you.
nicegaurav
Posts: 91
Joined: Mon Oct 15, 2012 10:03 am

Re: Passing parameters to create report using sql connection

Post by nicegaurav »

This is the SP used for making report and it will return 3 table and just want to know the process how to use all the columns from these three tables...

Create PROCEDURE [dbo].[VARIABLE_LEVEL_02]
@ProductID INT,
@Age TINYINT,
@State VARCHAR(2)
AS
SELECT DISTINCT * FROM VARIABLE_LEVEL_02_PROD_COMP_INFO WHERE ProductID='+CAST(@ProductID AS VARCHAR(10))
SELECT DISTINCT * FROM VARIABLE_LEVEL_02_AGE_INFO WHERE ProductID='+CAST(@ProductID AS VARCHAR(10))
SELECT DISTINCT * FROM VARIABLE_LEVEL_02_FEE_INFO WHERE ProductID='+CAST(@ProductID AS VARCHAR(10))

Thanks
Post Reply