Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Need help

Author  Topic 

bala2014
Starting Member

2 Posts

Posted - 2014-02-20 : 08:19:11

Hi folks,

i have to develop the Income statement report in report builder 3.0.one input parameter is company,in dropdown 18 companys will bind.if i select one company the income statement display for that company,if i select all company from filter income statement display the all 18 companys data.

i have done this sql query level,need to implement in report.


please help me on this.

bala

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-02-20 : 13:08:30
That sounds like a simple report. The exact steps to create the report is rather long, so look up how to create basic reports. Your query/stored proc that returns the income statement will have one parameter, which would be a parameter for the report as well.

You can fill in the "available values" for the report with the 18 companies, or a better option, store the companies and their ID's in the database, and use the "Get values from a Query" option to fill in the company names.
Go to Top of Page

hbadministrator
Posting Yak Master

120 Posts

Posted - 2014-02-20 : 15:06:13
Create 2 datasets.
in the first dataset create your main table that houses all the data including the 18 companies. Then in the Where statement create a (tablename.fieldname = @company). Next create a new dataset and do a select statement with just the column that corresponds to "" company from that tablename. Once both datasets are created go to parameters and click "add Parameters", Name it Company or whatever you feel like. General tab Name the field and then the prompt and check box the Allow Multiple Values. Then select Available Values on the left. Get Values from a Query. Choose Dataset2, Value Field you will select company or the name of the field you called it and then Label Field is the same. Hit ok and then preview.


Example DataSet1
Select Company, City, State, Zip
from TestTable
Where (TestTable.Company = @company)
--------------------------------------------------------------

Example Dataset2
Select Company
From Testtable
Group By Company




Go to Top of Page
   

- Advertisement -