Updating a table when a user selects a row (or triggers an action)

Hi,
i am designing a view on report builder 3, SQL Server 2008R2
i have a shared dataset that holds customer details, and another shared dataset that holds the sales details.
the report has a date from/to parameter and a category parameter.
i have designed the report to have two tables one to show all customers (with their details) and the other should show the sales of the specific selected customer within the date range
i have tried accomplishing this also by using a subreport with no luck, could you please let me know how i can this be done
many thanks!!
Ronen

Hi Ronen,
Per my understanding that you get the sales of the selected customer within the data range to display in the main report, right?
You have mentioned that you have tried to use a subreport but failed, the issue can be caused by the wrong you have setting the subreport or the relationship between the main report and the subreport.
As Uri Dimant suggested that we should add parameter in the subreport, details information below for your reference:
 I assumed that in the sales details table have the same fields or some relationship fields with that of the customer details table(Date, Category), so in the subreport create three parameter the same as that in the main reports and add the same filter.
Right click the Subreport to select the subreport properties and add the parameter like below:
Three parameter are comes from the subreport and the three fields in the value come form main report:
Another method which is similar like that of using the subreport is to using the LookUp function, because your SSRS version is 2008 R2 and this function only supported with SSRS 2008 R2 and Later version. Details information below for your
reference:
Create an DataSet2 to get all the fields from Sale Details table.
Find out the relationship field between the two table which is union (Date) to use in the expression in the main report like below:
=Lookup(Fields!Date.Value,Fields!Date.Value,Fields!Sales.Value,"DataSetName of the SalesDetails"):
Note: first field comes from Customer details table and second and third field comes from Sales details table.
Detail information about using the LookUP function in below article:
Lookup Function (Report Builder and SSRS)
If you still have any problem, please provide the sample data of the two tables.
Any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support

Similar Messages

  • Not Updating Customized Table when System having Performance Issue

    Hi,
    This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
    Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task).  But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
    I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
    Please advise if anyone has any idea why is this happening. Many thanks.
    Regards,
    Janet

    Hi Janet,
    you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
    Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from  FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
    SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
    Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
    I don't know your situation and goal so this is all I can tell you now.
    Good luck!
    Regards,
    Clemens

  • How to call an action when the user selects a radiobutton

    Hai
    PLease help me in providing the information.
    In my Project i have two radio buttons as
    New
    Asssessment
    when the user selects new button, i want to automatically call an action in the controller(.jpf file)
    Simalarly when he selects the other radio button i need to call a separate action in the controller.
    Remember i dont have the submit button.
    I want to dynamically call an action when the user selects the radio button.
    i dont have any field inthe radio button which actually takes action as an attribute .
    please provide me the necessary

    Hi,
    You can use JavaScript to call the action in interest upon the Radio Button Element Being Selected.Should be simple, and if your controller is part of the portlet dont forget to use the jpfScopeId to asscoiate the controller instance with the one in the portlet.
    Let me know if you have any further questions.

  • When the User exit EXIT_SAPLL03T_002 would be triggered?

    Hi All,
    When the User exit EXIT_SAPLL03T_002 would be triggered?
    As per my understanding which would be triggered while confirming the transferorder (LT12). but In which conditon it will be triggered?I am unable to find out. if any one find the solution please pass ur inputs ASAP.
    thanks in advance,
    chandran.

    Hi,
    WHen the "Update SAPML03T transfer orders"  is done..This user exit will be triggered..
    Since the user exit is in a update module..If you put break-point it will not stop...
    Enable the UPDATE DEBUGGING..It will process all the update modules..
    Check when the FM L_TA_QUITTIEREN is called....You can debug through your code..
    Thanks,
    Naren

  • How to update records in a table based on user selection..

    Hi all,
    This time the above doubt is totally based on the logic of coding which I tried a lot but didn't get any solution. so atlast I come to sdn site.
    please help..
    The requirement is like that I have a table with 6 fields (1 primary key and other are nonkeys). If the user inputs some values in the fields on the screen, then a row will be added in the table. Upto this i have done well. but when the user want to change some value  in the existing row of the table my program unable to do so. Because I couldn't get any logic to do that as there are 5 nonkey fields, so if any one field is modified then the respective row should be selected first based on the user selection and then it should be updated.
    At this point I could not get any idea as it may take a lots of if conditions (I guess) to reach to that particular row.
    Please help..
    thanks ,
    sekhar

    Hi Sekhar,
    I am afraid, the whole design of your program is wrong, let me explain
    Let us say you have two rows(5 non key fields) that the user wants to update and the data in these five non key fields are identical and in your program you are getting a number(which is the key) using a number range object. So you will have two entries in the table for the same data.
    And on the update page when the user enters the non key fields, how will the program know(or for that matter any one of us) which record to pick, if you have two identical books and if asked for a book wouldn't you ask which one among these two do you want?
    Possible Solution: Identify a possible key maintaining the integrity of the data, that is a combination of the non key fields which will help you identify a unique row and make these fields as key fields in the table.
    A more costly solution(if you do not want to change the non key field keys to key fields) would be to, adding a check(using select statement) to see if the non key fields combination already exists in the Z table before inserting a record into the table.
    If yes, throw a message to the user and just update the values in the table, else insert the record.
    Another solution would be to, use the non key fields to generate a key(using some logic) and using this instead of the number range object.
    regards,
    Chen

  • How to update the table when change list item in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
    my question
    1- how to do this by javascript and get the value from list item and update the table with new value
    2- is i must use API to create list item so i can get the value of item in report or what.
    Thanks
    Ahmed

    I coded the following to give you direction:
    1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
    onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
    <script language="JavaScript" type="text/javascript">
    function updateTable(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
    </script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value.

  • What Strategies are there for updating a table when you're using a multi-table view to display it.

    I'm using a view and am able to create a grid that allows editing of one of the columns. Let's call the table where the column is updated "DepartmentFeeDetail." The view has several joins but up till now the column was editable.
    Today I needed to join DepartmentFeeDetail with itself to pick up the debit side of a debit/credit pair. I want to show the gl account number for both
    the debit and credit on the same row. I also need to update the value for both debit and credit.
    I can no longer edit the column to no surprise. When updating using MSSQLMS I get the following error:
    View or function 'MyTestView' is not updatable because the modification affects multiple base tables.
    What should my strategy be in lightswitch? The grid is populated by a query that includes my lynq expressions in DepartmentFeeRateQuery_PreprocessQuery. The query may return 1000+ rows. I need to allow the accountant to edit either a single row's column
    or enter a value in a field outside the grid and click a button "Apply fee rate to entire page."
    All this was working fine until the requirement to show the debit side gl account number and to change the debit side value somehow.
    I've tried adding a property to DepartmentFeeDetail but the "Is Computed" property wouldn't allow me to uncheck it. Is there a way to add an editable property for each grid row and initialize it to the
    current value of the column returned by the view? I could then update a collection when one of the fields changes. If they change the global value and press "Apply fee rate to entire page"
    I can update the collection as well.
    Scott Mitchell

    What I do is instead of using a View I use a updatable
    WCF RIA Service.
    This is an example of an updateable method:
    public void UpdateQuestionDetailForUser(QuestionDetailForUser objQuestionDetailForUser)
    // Get the current user
    string strCurrentUserName = System.Web.HttpContext.Current.User.Identity.Name;
    // We are under Forms Authentication so if user is blank then we
    // are debugging and we are TestUser
    if (strCurrentUserName == "")
    strCurrentUserName = "TestUser";
    // Check for an existing Answer for this Question for this User
    var objSurveyAnswer = (from SurveyAnswers in this.Context.SurveyAnswers
    where SurveyAnswers.SurveyQuestion.Id == objQuestionDetailForUser.QuestionId
    where SurveyAnswers.UserName == strCurrentUserName
    select SurveyAnswers).FirstOrDefault();
    if (objSurveyAnswer != null)
    try // This is an update ****
    // Set values
    objSurveyAnswer.Choice = Convert.ToInt32(objQuestionDetailForUser.SelectedChoice);
    objSurveyAnswer.Comment = objQuestionDetailForUser.Comments;
    // Update LightSwitch Database
    this.Context.SaveChanges(
    System.Data.Objects.SaveOptions.DetectChangesBeforeSave);
    catch (Exception ex)
    throw new Exception("Error inserting QuestionId " + objQuestionDetailForUser.QuestionId, ex);
    else // This is an Insert ****
    // Query the GetAllQuestionsForUser method because it calculates if a Question
    // is Active or not for the QuestionId being inserted
    // If it is not in the collection, do not allow the insert
    var objUserQuestion = (from QuestionForUser in this.GetAllQuestionsForUser()
    where QuestionForUser.UserName == strCurrentUserName
    where QuestionForUser.QuestionId == objQuestionDetailForUser.QuestionId
    select QuestionForUser).FirstOrDefault();
    if (objUserQuestion != null)
    try
    // Get the Survey Question
    var objSurveyQuestion = (from SurveyQuestions in this.Context.SurveyQuestions
    where SurveyQuestions.Id == objQuestionDetailForUser.QuestionId
    select SurveyQuestions).FirstOrDefault();
    // Create a SurveyAnswer object
    SurveyAnswer objNewSurveyAnswer = this.Context.CreateObject<SurveyAnswer>();
    // Set values
    objNewSurveyAnswer.UserName = strCurrentUserName;
    objNewSurveyAnswer.Choice = Convert.ToInt32(objQuestionDetailForUser.SelectedChoice);
    objNewSurveyAnswer.Comment = objQuestionDetailForUser.Comments;
    objNewSurveyAnswer.SurveyQuestion = objSurveyQuestion;
    // Update LightSwitch Database
    this.Context.SurveyAnswers.AddObject(objNewSurveyAnswer);
    this.Context.SaveChanges(
    System.Data.Objects.SaveOptions.DetectChangesBeforeSave);
    catch (Exception ex)
    throw new Exception("Error inserting QuestionId " + objQuestionDetailForUser.QuestionId, ex);
    else
    throw new Exception("Error inserting Answer. Answer is not marked Active.");
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • How to update a bound textField with user selection ?

    Hi all,
    I'm following an Update Database example from the JSC tutorials and have the following situation.
    I have a page displaying a row of data for a selected person (first_name, last_name, title) bound to a data provider. I have made the "title' field a TextField. I want to enable the user to edit the title field and update the information in the database.
    If I simply type a new title on the text field and click on Update, everything works fine. However, I want to make the user choose from a list of titles (in a drop down list) instead of manually editting the 'title
    field to avoid spelling errors.
    However, the textfield (title) does not display the selection from the Drop Down list.
    titleField.setText(rankdropDown.getSelected());
    It seems to me that the reason is that each time the drop down event value change event handler is executed, the Pre-render methd kicks in and restores the 'title' field to its original value (from table rowset). And the user selection is not displayed.
    public void prerender() {
    try {
    getSessionBean1().getStudent_infoRowSet1().setObject(1, getSessionBean1().getLoginBean().getUsername());
    student_infoDataProvider1.refresh();
    } catch (Exception e) {
    Can someone please suggest a solution?
    Thanks.
    Nakul

    Are you submitting the page after selecting the data from the drop down?
    The drop down does not seem to have an option of submiting the page when the value is changed. Only if you submit the page, will the data be processed and the text field updated.
    From what i see in the doc for the prerender method, this method is invoked during the renderResponse phase. Whereas the value change event is processed during the process validation phase itself of the jsf life cycle.

  • When user select 1 row in alv some other rows must automaticaly get selecte

    When user selects say any row in alv with vbeln = 1234 all rows which have vbeln = 1234 also must get selected automaticaly.Is there some event to handle row selection in alv by clicking the push button beside each row to left of ALV?

    Hi
    U can implement an your push button in order to select the remaining rows: in user-command u need to implement a code where u get the selected line and the select the other.
    Or simply u can select the other lines as soon as the user do something after selecting a row.
    How to do it depends on whick kind of alv you're using: if the internal table fir output has a flag field for the marker, "To select a line" means to check that field.
    Max

  • Make a JScrollBar only update its JScrollPane when the user releases it?

    Hi
    I have a JTable inside a JScrollpane. The JTable gets its data from my TableModel using the getValueAt method in the normal way. It is almost working fine. The one thing left to improve is that I don�t want the JTable to keep trying to get its data while the scrollbar is still being dragged. This is primarily because the latency in fetching the data makes the UI unresponsive - the table model does not keep all rows in memory at one time, but keeps a page of data in memory.
    So, just to clarify, I want the behaviour to be that when the user is still adjusting the value of the scroll bar, the thumb position of the scroll bar moves, but the rows displayed in the JTable do not update. When the user releases the scrollbar, the rows should then update.
    I have almost acheived this by having a second, independent scroll bar on the frame, and an adjustment listener listening for events, like this
    public void adjustmentValueChanged(AdjustmentEvent e){
    if (e.getSource() == scrManual){
    if (!scrManual.getValueIsAdjusting()){
      JScrollBar scrTable = scrPaneResults.getVerticalScrollBar();
    int iManValue = scrManual.getValue();
    int iManMax = scrManual.getMaximum();
    float fManWhere = (float)iManValue / (float)iManMax;
    int iTblMax = scrTable.getMaximum();
    int iTblNewValue = (int)(iTblMax * fManWhere);
      scrTable.setValue(iTblNewValue);
    else
    throw new IllegalArgumentException("I don't know how to handle the adjustment event for " + e.getSource());
    }This is actually working fine, except that I don't want there to be two scrollbars - one in the scroll pane and one extra one. But when I try to make the scrollpane's scrollbar invisible, it remains visible.
    Can anyone tell me either
    (a) how to just have a normal JScrollPane scrollbar, but have it only update its viewport when the value is no longer adjusting (ie scrollbar has been released)
    (b) how to make the JScrollPane's scrollbar still effective, but invisible.
    (c) if the JScrollPane has a no scrollbars policy, how to instead in the code I posted above, set the ScrollPane's position directly.
    Whichever is easiest.
    Thanks for your help
    Mark

    Oh how embarassing! I already asked this question before, and answered it myself! Sorry - I think I am losing the plot
    I�ve hacked it. Turns out that the jScrollPane has a getXXXScrollBar method, which even when you�ve hidden the scrollbars, still works. You just use another scroll bar, register a listener for the mouse released event, and update the jScrollPane�s scroll bar to match the value.

  • Have an onchange event in SPD to update a list based on user selection of data view drop down?

    Hoping someone can point me in the right direction: I have a list for Media announcements, each one of these announcements will have various types of documents associated (via look up field in the doc library). I am trying to have a data form web part (dropdown)
    as the selector (as I am not liking the SharePoint list filter feature) to have a user be able to select the Media Title, then it refreshes the three web parts on the page (1 for the announcement, then one for type1 docs and one for type 2 docs.)
    What is the best way to create an onchange event to have the selected option be connected to the first web part (media title on a list view) so that the information on the page can all be filtered?

    Hi,
    Would you mind providing more details about your requirement? Are there one Announcements list and two Document Library in a page?
    Suppose you have one Announcements list and two Document Library in a page, then you want to add a Drop Down Menu(not the OOTB SharePoint List Filter Web Part) to filter the
    three List View Web Part dynamically.
    There will be two workarounds:
    1. Use the OOTB “Connections” feature of the list to “Get Filter Values From” one of the three lists, then there will be a “Select” button in that list, we can click it to filter
    other two lists/libraries. This is a way without code though we may not have the Drop Down Menu;
    2. Add three <iframe> in a page, then add a Drop Down Menu in this page. Now, we will need some JavaScript to listen to the onchange event of this Drop Down Menu. We can
    get the values populated in the Drop Down Menu from one of the column of one of the list, when making a selection in it, we can pass an URL with query strings to the three iframes which will show the three different lists or libraries.
    The second way requires some code to interact with Client Object Model cause we need to get values from a list, some script to handle the onchange event, which seems more suit
    with your need.
    Here are some links might be helpful if you want to take the second way:
    About how to find a specific element on a page using JavaScript:
    http://javascript.info/tutorial/searching-elements-dom
    Handle the onchange event using jQuery.change function:
    http://api.jquery.com/change/
    About query string to filter a list view:
    http://techtrainingnotes.blogspot.com/2012/03/sharepoint-search-filter-or-sort-lists.html
    About change the src attribute of iframe:
    http://stackoverflow.com/questions/3730159/changing-iframe-src-with-javascript
    http://www.w3schools.com/jsref/prop_frame_src.asp
    Best regards
    Patrick Liang
    TechNet Community Support

  • Change UI configuration dynamically when ever user selects a new value in a drop down field in WebUI

    I enhanced the standard activity component (i.e BT126S_APPT ). In this component, in BT126S_APPT/ApptSQ view there is a field 'PROCESS_TYPE' which is a dropdown. I have created a server event for this dropdown. So that whenever user selects a value in that dropdown, a event is called and after that DO_CONFIG_DETERMINATION is called. In DO_CONFIG_DETERMINATION, I am checking the value of 'PROCESS_TYPE' and based on that i am setting different config keys, by calling SET_CONFIG_KEYS( ). But the configuration is not changing in WebUI. When I press F2 in WebUI its showing the config keys( searched for ) as I set, but the found config keys are same as before. I have created the configuration with the new configuration keys. Please help, I am new to crm.

    Hello Shakthi,
    The easier option would be to convert the DropDownByKey to DropDownByIndex. If you still want to proceed with DropDownByKey then you need to initialise the ALV data again.  do the following
    1. after changing the attribute-value_set, call the ALV interface controller method SET_DATA and pass the instance of the context node.
    2. reintiliase all the ALV settings like edit mode, converting the column editor to DropDownByKey etc....
    This will ensure the new attribute value set is reflected in the ALV component.
    BR, Saravanan

  • Can't update master table when creating a materialized view log.

    Hi all,
    I am facing a very strange issue when trying to update a table on which I have created a materialized view log (to enable downstream fast refresh of MV's). The database I am working on is 10.2.0.4. Here is my issue:
    1. I can successfully update (via merge) a dimension table, call it TABLEA, with 100k updates. However when I create a materialized view log on TABLEA the merge statement hangs (I killed the query after leaving it to run for 8 hrs!). TABLEA has 11m records and has a number of indexes (bitmaps and btree) and constraints on it.
    2. I then create a copy of TABLEA, call it TABLEB and re-created all the indexes and constraints that exist on TABLEA. I created a materialzied view log on TABLEB and ran the same update....the merge completed in under 5min!
    The only difference between TABLEA and TABLEB is that the dimension TABLEA is referenced by a number of FACT tables (by FKs on the FACTS) however this surely should not cause a problem. I don't understand why the merge on TABLEA is not completing...even though it works fine on its copy TABLEB? I have tried rebuilding the indexes on TABLEA but this did not work.
    Any help or ideas on this would be most appreciated.
    Kind Regards
    Mitesh
    email: [email protected]

    Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
    From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
    I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
    Many thanks for your help.

  • "File Dialog" Express VI returns the wrong path when the user selects the desktop

    In labview 8.0.1 with Windows
    XP, the File Dialog Express VI seems to return something other than the path
    selected by the user when configured to browse for folders (or files and
    folders) and the user selects the desktop.
    I can't determine exactly when it works and when it fails, but it always seems
    to fail if the user selects the desktop from the places bar (the shortcuts on
    the left side of the dialog) or from the drop-down menu at the top of the
    dialog and then clicks the "Current Folder" button to dismiss the
    dialog.  In this case it always returns whatever path is wired to the
    "Start Path" terminal.
    If the user navigates to the desktop with the "Up One Level" button
    or by selecting the actual desktop directory under Documents and Settings, the
    correct path is returned.
    If the user selects a file before clicking the desktop icon, then clicks
    "Current Folder" the correct path is returned.
    If the user clicks the desktop icon, clicks open, then clicks "Current
    Folder" the correct path is returned.
    It's possible to work around this bug in most cases by setting the start path
    to the desktop.
    Has anyone seen this behavior before?
    Can anybody verify this behavior by running the attached VI?
    In the past, when I've reported issues like this I've received responses from
    NI engineers that basically said "Thanks, but we already knew
    that".  Is there anywhere that users can search the list of known
    bugs and avoid wasting time tracking down issues that are already understood by
    NI?
    Thanks,
    Adam Brewster
    Attachments:
    File Dialog Test.vi ‏39 KB

    I'm on 8.2 and I can't get it to fail no matter how I select the desktop. I haven't tried it in 8.0, but I imagine that if this really is a bug, they did know about it and fixed it with 8.2. If this causes a real problem for you, I would suggest upgrading if you can.

  • How do I run a video in one cell of a table when a user clicks a button in another cell?

    In other words, I want to put 3 buttons in one cell of a table so that the user can run one of three Flash videos in a cell beside the buttons. How do I do that?
    Header 1
    Header 2
    button 1 runs video 1
    button 2 runs video 2
    button 3 runs video 3
                                     video 1, 2, or 3 is inserted here when the user clicks the button

    You will have better luck if you find a Flash Player that uses a playlist.  Direct links to FLV files don't work.
    http://www.wimpyplayer.com/
    http://www.woosterwebdesign.com/flvplayer/
    http://www.longtailvideo.com/players/jw-flv-player/
    http://flowplayer.org/
    Another option is to upload your videos to YouTube.com. You can customize a YouTube player and populate it with videos you specify.  Then paste their player embed code into your web page.
    http://code.google.com/apis/youtube/getting_started.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

Maybe you are looking for