Good Afternoon,
So I have built a State Map in Report builder that is separated into Counties. I have been pretty successful, however there is one thing I cannot figure out. When I click on the county, is it possible to pass the county name that I clicked to a chart on the same report. I can pass it to another report via go to report, but I would like to have it on the same document.I also kept getting a Subreport not found when I attempted that method. Any help is greatly appreciated.
Thanks!
A basic rule of SSRS is that with very few exceptions, you cannot change the content of a report unless you refresh the report.
Bearing this in mind, you have a couple of options..
Call the same report again as a subreport.
Assuming you only want your map and a single dynamic chart.
Add a parameter to the report that defaults to specific value such as 'none'. Then you can decide what do show in your chart when the parameter = 'none' or you could choose the hide the chart if the parameter is 'none'.
In your map go to the map's polygon properties and assign an action.
Set the action to be Go to Report
Choose your report (so we get the report to call itself)
Add a parameter, choose the parameter you added a few steps earlier as the name and select the field that contains the state name or ID etc as the value.
Your Chart's dataset can then be updated to use the new parameter in the dataset query.
Create a chart for every State
The other option is to create a chart for every state, you can do this using a table or list control and a subreport containing your chart, so you design will not have to have lots of charts individually placed.
Each Chart can have a bookmark set (most objects have a bookmark property) that is the name or ID of the state it represents.
Then in your map, set the action properties in the polygon properties to 'Go to bookmark' and then use the state name or ID as the bookmark expression to go to.
Related
In App Maker, what is the simplest way to achieve the same result with a dropdown box that you can with a suggest box, which can return the whole record when you make a selection giving you the ability to assign associated record values to other fields on the page?
Consider a data model with three fields, (Code, Description, and Severity). Add a dropdown box to select the Code. Have the selection, (probably using onValueChange or onValueEdit), write the selected Code's Description to a label field beside the dropdown box. The Code's Severity will also be used to affect the style in some way like background color or something, but for this answer, merely assigning the value to a scripting variable will be good enough. It's the record value access and assignment mechanism I am after.
Clarification: This data model will not be the page's datasource. It is a secondary reference table used for assigning a code to a ticket. You can also assume that a record value will be written to a field in the page's datasource as well.
I would appreciate the simplest low code solution as we will have non-programmers attempting this. Thanks.
As long as you leave your value binding on the dropdown blank the following should work:
Set the options binding to:
#datasources.YourDatasource.items
You may want to consider changing the 'Names' binding to be the projection of a particular field in this datasource otherwise the values showing in your dropdown will only be the 'keys' from this datasource.
Then in your onValueEdit event you will gain access to individual fields like this:
var item = widget.datasource.item;
item.YourFieldToEdit1 = newValue.YourOtherDatasourceField1;
item.YourFieldToEdit2 = newValue.YourOtherDatasourceField2;
That would probably be the simplest way.
I'm trying to use a gantt control in D365 FO as a way to visualize appointments in rooms.
Therefore, the rooms are loaded as summaries and the appointments are linked as activities to the rooms.
The user is able to select an appointment from a grid.
As this happens, the view range shall be changed to show the interval [begin-12, end+12] and the appointments together with their rooms shall be added to the gantt.
The code looks somewhat like that:
// changes FromDateTime, ToDateTime in gantt control
this.setViewRange();
// adds rooms and appointments to a list
// and adds them to the gantt by calling parmActivities(theList) on the gantt control
this.addAppointments();
// standard method to refresh the gantt
ganttControl.refresh();
For some reason, the gantt does only adapt to the view changes for the appointment selected when the form is loaded.
Any further attempts to change the view range by changing the selection fail and the gantt does not react in any way to the change.
When moving the gantt to a separate form the view range is set as expected for initialization.
Is there anything I'm missing when dealing with gantts?
For some reason, the GanttControl does not allow to be changed directly after initialization by calling
ganttControl.parmConfiguration().parmFromDateTime(foo);
Instead you need to create a GanttControlConfiguration object first.
The following code solves the problem:
GanttControlConfiguration configuration = ganttControl.parmConfiguration();
configuration.parmAllowMultiChange(true);
configuration.parmFromDateTime(foo);
configuration.parmToDateTime(bar);
ganttControl.parmConfiguration(configuration);
I have a column "full name" in a list and I want to configure drill down for it so that when I click on a particular user's full name, it displays all the bio data of that user from another table.
My requirement is that at the front end, it should show the full names of the users, but when I click on the user's name, it should pass E-mail address of the user for the drill down.
Please need help for doing it.
I'm going to assume you are using a list object. the instructions for a crosstab would be slightly different:
Add the item you want to pass to the drill-through target to your query
In the report page, select the list
Click on the ellipses (...) in the 'Properties' property of the list object
Check the box next to the data item that you added to the query in step 1 and click 'OK'
When you define the drill-through parameters, select 'Pass the data item value' for the method and the data item added to the query in step 1 as the Value.
I have been working with SSRS for the last year and a half or so. Everything I know from it has been learned by trial and error and google. So hopefully I get my terminology correct, but forgive me if I say something incorrectly.
I am using Visual Studios 2015, connecting to SQL 2012 server. I'm creating an asp.net/VB web application to display SSRS reports on a local site. All of my reports up to this point have been a single report with no sub-report. If "sup-report data" was desired, I created a drill-through, using an Action, to navigate to a completely separate page. This has been working really well for all my reports, but now I would like to get a little fancier.
I have been trying to create a SSRS report that contains a sub-report. The main report contains summary information about batches of a particular product that has been run (blue and white portion of the table in the picture).
If a user wants to view more specific details about the batch, they can click on the expand/collapse button of the "Process Order" column, and a sub-report below the summary line will appear with more specific information about the batch (sub report is the light grey/dark grey table).
I configured the properties on the main report to pass the ProcessOrder value as a parameter on the sub-report and create a parameter on the sub report to accept this parameter.
You can tell that this parameter is being passed successfully because I have the respective parameter being passed and displayed just above the table (and it matches the number on the main table). As you can see from the picture, I also have the Process Order number displayed on the sub-report table itself, and this number is different than what is being passed to the report. It is showing a "1", which is the default value that I gave to the SQLDataSource control on my aspx page to build the dataset. I've tried not setting a "Default value" but then I get the following error:
“Data retrieval failed for the subreport, 'test_Sub_Report2', located at: [location on hard drive] Please check the log files for more information.”
Has anyone encountered this problem before, or can anyone give me an idea of a direction to go from here? I feel like I’m very close since I’m getting the parameter successfully passed to the sub-report, but the dataset is just not using that parameter to go get the data from SQL, and I’m not sure how to tell it to do so.
I can add more details and post more of the actual code, just let me know what you need and I will do my best to get it to you. I would have included more screenshots, but I don't have enough rep points to do so yet.
You need to go into the DataSet that populates the sub-report, and go to the Parameters tab, and map the ProcessOrder parameter of the dataset to the Variable that you pass the ProcessOrder parameter to from the main report.
I ended up figuring out the answer. I used the answer from #Lazy Coder on this question: SubReport is not working after adding parameter I was adding the parameters to the sub-report incorrectly. I did have them passed to the sub-report through the table on my main report, which was getting the parameters to the sub-report, but the sub-report was not using these values to create the data set. On my test_page.aspx.vb file I had to change my SubReportProcessing Event Handler. I needed to explicitly set the parameters values there. Since the time that I originally posted this question, I added another parameter to my stored procedure as well, subTotalTime, to correctly filter my results.
Public Sub SetSubDataSource(sender As Object, e As SubreportProcessingEventArgs)
Dim report = DirectCast(sender, LocalReport).DataSources(0)
Dim subProcessOrder = e.Parameters("subProcessOrder").Values(0)
Dim subTotalTime = e.Parameters("subTotalTime").Values(0)
SqlDataSource_PPMS_test_Sub_Page.SelectParameters(1).DefaultValue = subProcessOrder
SqlDataSource_PPMS_test_Sub_Page.SelectParameters(2).DefaultValue = subTotalTime
e.DataSources.Add(New ReportDataSource("DataSet2", SqlDataSource_PPMS_test_Sub_Page))
End Sub
SqlDataSource_PPMS_test_Sub_Page is the id of my SqlDataSource object on my aspx page.
I'm currently working on an ASP.Net WebForms application that allows a user to select an item from a list, which ultimately results in a SSRS report being shown, using Report Viewer 2010 (in server mode). The report has been coded with a parameter #id to allow the report to display the correct data for the selected item.
The reports dataset can return multiple rows where some of the data is displayed in a summary area at the top (not in the header section) for example a textbox would have the expression =FIRST(Fields!Address.Value, "dsMain"). The data returned is denormalized so Address will always be the same value. Which is why using FIRST() works. And the rest of the data is shown in a Tablix with grouping applied etc.
But now I'm looking to change this so users can select multiple items and therefore effectively show the report multiple times, but shown in the same report viewer control. The main requirement is to batch print the reports, so showing it in one report view control is important to allow for one click printing of everything.
Now because I didn't design the report in the first place and because its fairly complex in its layout and the sql that is executed; the sql is geared towards running for one id and not a list of them. I'm looking for options to not have to rewrite the report or the sql.
Is it possible to give the report viewer the id parameter as a list and let the report viewer execute same report for each id passed? - I know report parameter can accept multiple values but this isn't the same since the report will unintelligently pass the first value to my stored procedure but not repeat the report for the other values. Perhaps there's a setting in the report designer that allows it to repeat if it is passed multiple values?
Can someone suggest something else to get this working? Or is my only option to extend the report and sql to accept multiple id's and effectively redesign the report?
Thanks any suggestions or help with this.
The answer is to use sub-reports.
Create a new report that takes a list of ids as a multi valued parameter.
Use that parameter as the dataset for a list control.
Have a subreport inside the list. Report inside the list is your original report.
You can then pass each element of your dataset(your list of parameters) as parameter to the your sub-report.
SSRS will repeat it as your want.