Page 1 of 2

Passing parameters to create report using sql connection

Posted: Mon Oct 29, 2012 5:08 am
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

Re: Passing parameters to create report using sql connection

Posted: Mon Oct 29, 2012 7:39 am
by HighAley
Hello.

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

Thank you.

Re: Passing parameters to create report using sql connection

Posted: Mon Nov 05, 2012 12:04 pm
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

Re: Passing parameters to create report using sql connection

Posted: Tue Nov 06, 2012 4:19 am
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 ..

Re: Passing parameters to create report using sql connection

Posted: Tue Nov 06, 2012 6:14 am
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.

Re: Passing parameters to create report using sql connection

Posted: Wed Nov 07, 2012 6:02 am
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..

Re: Passing parameters to create report using sql connection

Posted: Thu Nov 08, 2012 5:58 am
by Alex K.
Hello,

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

Thank you.

Re: Passing parameters to create report using sql connection

Posted: Mon Nov 19, 2012 10:29 am
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

Re: Passing parameters to create report using sql connection

Posted: Mon Nov 19, 2012 11:23 am
by Alex K.
Hello,

Can you please send us a sample procedure for analysis.

Thank you.

Re: Passing parameters to create report using sql connection

Posted: Mon Nov 19, 2012 12:10 pm
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