How To Design Dynamic Reports Based On User's Choice
Dec 13, 2006
Hi all,
I'm a beginner to Report Services, and have tons of questions.
Here's the first one:
if the reports are created based on the condition that the user selects, how can I create the reports with Report Services?
For example,
the user can select the fields that will be shown on the reports, as well as the group fields, the sort fields and restrict fields. So I would not be able to pre-create all possible reports and deploy them to the report server, and I think I should create the reports dynamicly based on what the user select.
Could someone tell me how to do it (create and deploy the reports)?
I would like to know if is possible to create dynamic reports based on cubes. What i mean is,after creating a cube with a couple of dimensions and measure if is there any way to give the normal users on the report manager or report builder the freedom to choose their own dimensions/measure so they can output the report with the choosen criteria.
Let's say I have a table with 3 fields: an ID field (primary key, set as an id field, etc.), a Name field (nvarchar50), and an Age field (int). I have a form that has three elements: DropDownList1: This drop down list contains 3 choices- "=", ">", and "<". Age: This text box is where someone would enter a number. Button1: This is the form's submit button. I want someone to be able to search the database for entries where the Age is either equal to ("="), greater than (">"), or less than ("<") whatever number they enter into TextBox1. The code-behind is shown below. The part I'm confused about is that if I load this page, the query works the -first- time. Then, if I try to change the parameters in the form and submit it, I get the following error: "The variable name '@Age' has already been declared. Variable names must be unique within a query batch or stored procedure." Any help would be appreciated. Here is what I'm using in my code behind: protected void Button1_Click(object sender, EventArgs e) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("SELECT * FROM People WHERE Age "); switch (DropDownList1.SelectedValue) { case "=": sb.Append("= "); break; case ">": sb.Append("> "); break; case "<": sb.Append("< "); break; } sb.Append("@Age"); SqlDataSource1.SelectCommand = sb.ToString(); SqlDataSource1.SelectParameters.Add("Age", TypeCode.Int32, Age.Text); }
I have some sensitive and non-sensitive info/fields in one of my reports. Is there a way to hide/show the info based on the logged in user? or do I have to create separte reports for each type of info like one for sensitive and another one for non-sensitive info.
I need to create a set so that when a user selects a month in filter (say 201506) then it should give me a list of months from 201406 to 201506. Any appropriate MDX query.
How do I get a particular user to be a choice under the db_owner role for a particular database? The user is listed under logins and even shows to be the db_owner for the database under the database access tab of the login properties. This is SQL 2000. Thanks, David P.
I have a report that includes two multi-valued parameters. In the Default Values section, I choose 'from query' and select dataset and value field. In the Available Values section, I choose 'from query' select the same dataset and value field, and in the label field I select the relevant label field. When I run the report my multi-valued parameters look like I selected the option 'select all' (all options are selected). How can I keep the multi-valued parameters cleared from selections until the user select his choice? Thanks in advance.
I am new to SSRS. I have created simple report using reporting services, In which i am using one List element and inside that 8 text boxes and a table, in which 4 texboxes is used as lable and remain 4 textbos is value from dataset and table displays details as below for each unquie call number with table header marked in red color. When i click preview i get below report(Report 1) for call number 4 and 10 records in table which is under list. But for call number 4 still 6 records as to be display in next page with text boxe element which marked in Green color in Report 1. Now i am getting report with out List element i.e (Report 2 given below )
Report generated for Call numnber 4 (on click of preview ) (Report 1)
Generated Report
Call No 4
CallDate 2/2/2007
Customer Name ZINDAL STEEL P . LTD
Address Chennai
SL Number PartNumber PartName Qty Rate Amount
1 12345 SCREWS 100 10 1000
2 47555 BOLTS 200 25 5000
3 125453 RIVETS 300 40 12000
4 15786 RATCHETS 500 23 11500
5 15566 TORQUE WRENCH 600 45 27000
10 5456 HARMONIZATION TOOL 700 45 31500
(Report 2) Report generated for Same Call number 4 in next page with out List element, In this page i want display the same textboes and values which are marked in green color.(This 6 records alos belongs to same call Number 4 )
SL Number PartNumber PartName Qty Rate Amount
11 12345 SCREWS 6" 100 10 1000
12 47555 BOLTS 5" 200 25 5000
13 125453 RIVETS 5" 300 40 12000
14 15786 RATCHETS Big 500 23 11500
15 15566 TORQUE WRENCH Small 600 45 27000
16 5456 HARMONIZATION TOOL 700 45 31500
Can any one please guide me how to do this kind of desing.
Is there a way to pass parameters into the Report Builder so that the available fields of an entity can vary depending on a parameter value (for instance, a group or user id)?
We have a situation where each group of users can have a variable set of custom properties to report on and we'd like to let them access these custom properties through the Report Builder. Any suggestions on how to go about it?
Ok, I'm using vb2005 express and I know that the reportviewer control has to be added and reports can't be designed from the IDE. So, I downloaded the business intelligence studio and I can design a report that looks like just what I want. What I can't seem to do is add that report to the application I'm developing. I don't want to use a report server - I want to use the report with client side processsing. I'm wondering if this is possible and if so how? When I try to add that .rdl file or rename it to a .rdcl file to my project I'm not allowed to do so. Any thoughts?
hi, Can any one help me out how to dyanmically link to differnt reports ie.,
Column A Data 1 Data 2 Data 3
On CLick on Data 1 "Report A" should be opened. On Click on Data2 "Report B" should be opened. I tried int he following way: In report After APrameter form i hav specified a link for Report A(On clcik of data field ). But Always it is opening only one report as i specifed. How to link Dyanamically. Allt he Data in Colum A comes from Database Dyanamically.
I can create static report with Report Server, but wanted if anyone can help me create a report that is dynamic and regenerates with new data as it comes in.
I'm currently working on a project that I'm having some design difficulties with and I was hoping that some of you could help me out. What I'm designing is sort of a webbased directory service based on different custom made templates. Imagine the yellow pages with different column requirements for each branch. Example:
I have designed a few tables that look like this: DECLARE @templates TABLE (TemplateID INT IDENTITY(1, 1), TemplateName VARCHAR(50)) DECLARE @attributes TABLE (AttributeID INT IDENTITY(1, 1), AttributeName VARCHAR(50)) DECLARE @template_attributes TABLE (TemplateID INT, AttributeID INT) DECLARE @values TABLE (ValueID INT IDENTITY(1, 1), TemplateID INT, AttributeID INT, Value VARCHAR(200))
INSERT INTO @templates SELECT 'Restaurant' UNION ALL SELECT 'DBAForHire'
INSERT INTO @attributes SELECT 'Name' UNION ALL SELECT 'Adress' UNION ALL SELECT 'TakeAway' UNION ALL SELECT 'YearsExperience'
INSERT INTO @template_attributes SELECT 1, 1 UNION ALL SELECT 1, 2 UNION ALL SELECT 1, 3 UNION ALL SELECT 2, 1 UNION ALL SELECT 2, 2 UNION ALL SELECT 2, 4
INSERT INTO @values SELECT 1, 1, 'Lumbagos TexMex' UNION ALL SELECT 1, 2, 'Mainstreet Oslo' UNION ALL SELECT 1, 3, 'Yes' UNION ALL SELECT 2, 1, 'Peso' UNION ALL SELECT 2, 2, 'Somewhere IN Sweden' UNION ALL SELECT 2, 4, '10'
SELECT TemplateName, AttributeName, Value FROM @templates a INNER JOIN @template_attributes b ON a.TemplateID = b.TemplateID INNER JOIN @attributes c ON b.AttributeID = c.AttributeID INNER JOIN @values d ON b.TemplateID = d.TemplateID AND c.AttributeID = d.AttributeIDThe problem I need help with is that with the current design all "Values" are defined as varchar(200)...is it possible to change the design so that it's equally flexible but also fasilitates different datatypes? In some cases I would like to have a description column with way more than 200 characters, and I'd also like to save numbers as actual numbers...not like my example above with "YearsExperience". Is it at all possible?? I would appreciate your insight on this...
-- Lumbago "Real programmers don't document, if it was hard to write it should be hard to understand"
I have bunch of reports that take same set of parameters. I am trying parametrize the report type so that depending on the report type selected, body should display that report when user hits "View report" button. How can I do this? Pardon me if there is an obvious solution as I am pretty new to the joys of MS Reporting Services.
I'm new to developing reports using 2005 SQL Reporting Services. Is it possible to develop reports based on more than one database, (generally MS SQL)? I need to set up a dataset that includes tables from several different databases linked together so that information can be viewed together in one report. thanks
1) How can i create RSBuild.config file to deploy reports which are created out of Analysis Services cube? What should be the datasource tags for SSAS extension. I've tried with OLEDB-MD and it doesnt work.
2) Few reports has two datasources. How can i mark multiple datasources in the config file for one report?
3) The folder names are created in lower case font by default. Is this a known behaviour of RsBuild or we can do some work around to get this done. For instance, folder name "Employee Reports" is coming as "employeereports"
This is bit urgent, your respose would be much appreciated. Thanks!!
Hey guys, I need a little help for my group project(Using ASP.NET 2 connected to SQL Server 2005). Here's the scenario:
Our system is basically a sort of login/logout system, so we have a table that has (Name, Date, Subject, TimeIn, TimeOut).
1. User registers on website, so information like e-mail is recorded into the database (and the user in the website is "linked/checked" to his data in the SQL Server for verification). 2. Users can choose to subscribe to a weekly report e-mail(maybe using a simple "IsSubscribed" boolean value in the database). 3. Every week, our system scans the database for those users who subscribed, then send different e-mail reports depending on the particular user (a compiled weekly report for Mon-Fri).
Is there such a feature in Database Mail? If not, how do I execute these types queries and just set them as a Scheduled Task?
Hi,We have XML files (and its XSD) that are dump of our tree-like datastructure in memory. These XML files may potentially have unlimitedlevels of nesting because some elements can contain themselves(recursively defined).We want to build some reports using some third party reporting tool(Crystal Report, for example).The first question is - is there any way for Crystal Reports toprocess such complicated (some elements have recursive definitions)XML file directly? If not, anyone knows any other reporting tool thatcan do that job?The second question is - if we have to develop a small applicationthat converts the XML to dataset, anyone who has done similar thingbefore can give us some recommendations as to which approach is theeasiest to take (Java, .NET, etc.)? I'd appreciate it if someone canpoint me to some resources to get me started.Another approach is to convert the hierarchical XML into relationaltable set and store the data into relational database. In that case,the reporting tool can simply read from the database. I'd appreciateit if someone can let me know if there is any softeware/program thatcan do the conversion. (I heard that some database server can do theconversion from XML to relational tables, but didn't find anythingconcrete.)Any comment/recommendation is appreciated!Thank you for your help in advance!!
I have a requirement to create dynamic reports for my client.
once i create these reports then the user will choose columns of there choice.
so the columns may belong to multiple tables.
Now the report should get generated with the layout etc. is it possible.
since our project is totally on the webserver(webbased.)
please if you can provide me with any links with dynamic report creation wizards.
and also we only use Stored procedures via database.
which is best is writing the entire queries right behind the layouit or calling the entire logic via Stored procedure. i am a bit confused. this is my first project working on reports itself.
Frank writes "Any suggestion on the best design to store data for resource management so that data can be displayed afterwards in something like a gantt chart.
For example, you have to asign resources, say personID 1 to 100 to fill positions A, B, C, D, E and F
A position must always be filled. A person can only fill one position at a time. You want to be able to detect overlaps when you do your planning.
So if person 2 is in position B from 1 Jan to 15 March, he is currently unavailable, but he should be availabe in my planning for any position from 16 March onwards etc.
Possible queries - 1) list all positions not filled during period XXXX to YYYY 2) List all persons available to fill a certain postion during period XXXX to YYYY 3) List any overlaps where a person is assigned to different postions during overlapping time frames..."
in simple words it's about versioning at record level.ExampleTableEmployee - EmployeeId, EmployeeName,EmployeeAddress, DepartmentId,TableDesignationMap - EmployeeId, DesignationId, EffectiveDate,validityTableDepartment - DepartmentId, DepartmentTableDesignation - DesignationId, designationVia Modify-Employee-Details screen following are editableEmoyeeNameEmployeeAddressDepartmentDesignationthis screen should allow user to navigate through changes history.Example :Version -1EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation AccountantVersion -2EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation Chief Accountant - changedVersion -3EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment Sales - changedDesignation Marketing Manager - changedQuestion :What is the best proposed database design for maintaining historyrecords bound with version and retrieval techniqueBest RegardsSasanka
I have a design question that I'd like some input on. I am trying to archive data from an extremely large production database. The tables to be archived changes quite often. It is currently along the lines of 80-100 tables with the possibility (likelihood) to grow from there.
If at all possible, I'd like to avoid writing an individual dataflow transformation for each table. I know that SSIS does not offer the same capabilities to change the metadata at runtime as DTS. I am currently exploring the option of programmatically creating/modifying the packages through the .Net framework. (using this link as a guide: http://msdn2.microsoft.com/en-us/library/ms345167.aspx).
I have concerns about the performance of this approach and was wondering if anyone had any feedback, or has implemented something similar, or has any other ideas on a different way to accomplish the same thing.
SELECT DISTINCT Anvendelseskoder.[Usage Code] AS [Building Code], Anvendelseskoder.[Usage Code Value] AS [Building Description], HeleDanmark_DAWA.KVHx FROM Anvendelseskoder RIGHT JOIN HeleDanmark_DAWA
[Code] ...
It gives me the following error: Msg 4104, Level 16, State 1, Line 26 The multi-part identifier "aa.KVHx" could not be bound.
When clicked, it marks the first time i call "aa.KVHx" Which I do in: "WHERE S2.Nr=2 AND s2.KVHx=aa.KVHx) AS Kode2,"
I have a reporting scenario, where the reports are fetched from Analysis Services. The reports should display data only spcecific to that user. All users except those in admin roles should be validated using the Windows Authentication ID and data specific to them has to be displayed.
Any pointers/suggestions on how to implement this in Reporting services/ Analysis Services 2005 would be highly appreciated
We have a matrix report which displays columns in a default sorting order. This report columns vary dynamically depending on the user input.
e.g. If user wants to see the report for column Alfa, Beta , Gama then a report will be genarted with column Alfa, Beta , Gama sorted in alphabetical order.
Site %Risk Alfa Beta Gama
X 2 1 2 3
Y 10 4 5 6 However the users want the Columns to be sorted in the order which they provide the inputs e.g. if the user entered Gama, Alfa, Beta the report should display the columns in the same order instead of applying the default sorting order.
Site %Risk Gama Alfa Beta
X 2 3 1 2
Y 10 6 4 5
Any thoughts on ways to achieve this in SSRS matrix report would really help.
Does any body know that creating free form rports using Report Builder is possible?
Free-form report - in the sense - that user should be able to drag the fields from the leftside fields pane and drop on body as we do in report designer using BI studio.
I could not figure out a way to do so. Is this a limitation?
I have one requirement. We have one application in banking and they have developer that application using c# and .Net code so For Business Users--when they enter their details and when they want to check Reports--it should take to a another UI or web page where Users will see all the reports--- and clicking the report he/she should be get able to export it into different formats..
i know that we can give report manager URL--but due to various issues-- we have choosen to built a web[age where they can see the reports work-flow:
so--user opens bank site--enters his details-goes into reports--it should open new webpage or UI, he should see all reports--he should export these reports..
After that based upon security levels each user can see their individual reports.