How to query a dataset using custom code in report builder 3.0

Hi,
Can anyone please suggest whether it is possible to query a dataset by using custom code in report builder 3.0.
Thanks in advance.

Hi Purbasha,
please see below similar thread:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9af8f39a-9dc5-49ab-91af-2f64198c8477/ssrs-2008-custom-code-for-database-query
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/440ff5de-1c21-47de-95d8-e4212d6cef6d/dataset-in-custom-code-in-sql-server-reporting-services?forum=sqlreportingservices
swallow

Similar Messages

  • Query a dataset in MS SQL Server Report Builder and get splitted output of one of the fields

    Hi experts,
    I have a dataset in MS SQL Server Report Builder containing some rows like the following:
    FIELD-1
    FIELD-2
    FIELD-3
    1
    efgh
    xjhg[R]ztazutsuz[R]9
    2
    abcd
    1234[R]abcd[R]5678
    What I need is:
    FIELD-1
    FIELD-2
    FIELD-3
    1
    efgh
    xjhg
    1
    efgh
    ztazutsuz
    1
    efgh
    9
    2
    abcd
    1234
    2
    abcd
    abcd
    2
    abcd
    5678
    Can this be done?
    I'll be very happy when one finds a solution.
    Kind regards,
    Peter

    try like this..
    Declare @ta table ([FIELD-1] int, [FIELD-2] nvarchar(100), [FIELD-3] nvarchar(100))
    insert into @ta
    select 1, 'efgh', 'xjhg[R]ztazutsuz[R]9' union all
    select 2, 'abcd', '1234[R]abcd[R]5678'
    select t.[FIELD-1],t.[FIELD-2], a.b.value('.','nvarchar(100)') as [FIELD-3] from @ta t
    Cross apply
    (select cast('<R><C>' + replace(t.[FIELD-3],'[R]','</C><C>')+ '</C></R>' as xml) as XStr ) x
    Cross apply x.xstr.nodes('R/C')a(b)
    Thanks,
    Saurabh 
    http://www.linkedin.com/in/sbhadauria http://www.experts-exchange.com/M_6313078.html

  • Who's Who: How to refine employee search using customer defined indicator?

    Hello,
    It is possible to refine employee search using status indicator STAT2 (Employees' Employment Status). I would like to refine employee search using e.g. Customer defined status indicator STAT1. I created an entry identical to STAT2 but with STAT1
    in view V_T77S0 but it did not help at all.
    How to refine employee search using customer defined indicator or any other info
    from infotype 0000 or 0001?
    Kind regards,
    Pawel

    Hi
    This could be done using the infosets provided in who's who customization screen.
    Pl go through following help.
    If this helps, pl do reward.
    Who's Who (ESS): Selection and Output
    In this activity, you can change the fields for selecting and outputting data for the Who's Who service. The fields of the underlying InfoSet Query are available. Note, however, that text fields cannot be used for data selection (with the exception of the fields Organizational Unit, Position Name, and Job Name).
    You have the following options:
    You can specify the fields for selecting an employee.
    You can specify the fields for the hitlist, that is, the list of all employees who meet the selection criteria.
    You can specify the fields for the detail screen for a selected employee.
    All selected fields are automatically transferred to the service in the sequence you chose and are then available for selection or output.
    Standard settings
    The standard system contains an InfoSet for the service. It contains default selection and output fields.
    Activities
    1. Check whether the default settings fulfill your requirements.
    2. If you want to change the default values, proceed as follows:
    a) Choose the relevant tab page and remove the indicator in the Use default settings for group box.
    To change the selection fields, choose the Selection Fields tab page.
    To change the fields of the hitlist, choose the Output Fields List tab page.
    To change the fields of the detail screen, choose the Output Fields Detail tab page.
    b) If you want to delete a default field, select the field in the relevant tab page and choose Delete Line from Display Table.
    c) If you want to add an additional field from the InfoSet, select the field in the Fields in InfoSet group box and choose Copy Entry from InfoSet Table. You have two options:
    You select an existing field in the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it above the selected entry.
    You select the blank field at the end of the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it at the end of the tab page.
    Note that the sequence of the fields in the tab page determines the sequence of the fields in the service.
    The selection screen fields are laid out according to the following pattern (maximum of 4 rows and 20 fields):
    1 I 2 I 3 I13 I17
    4 I 5 I 6 I14 I18
    7 I 8 I 9 I15 I19
    10 I11 I12 I16 I20
    The fields in the detail screen are laid out underneath each other for a maximum of 20 rows, while the fields in the hitlist are laid out from left to right for each row, for a maximum of 20 fields.
    Note: You cannot select by the Employment Status field (P0000-STAT2).
    d) If you want to add a new field that is not in the InfoSet, you have to create a new InfoSet. You then assign the required field to the new InfoSet. Then select the new InfoSet in the InfoSet field in the Parameters group box. Proceed as described above to add the field to the relevant tab page.
    For information about creating InfoSets, see Specify InfoSets for Interactive Employee Selection in the IMG for the HR Information System.
    Not the SAP naming convention for the standard InfoSet: /SAPQUERY/HR_XX_PA_ESS
    The country code "XX" stands for "international." The InfoSet itself is in the global area (cross-client). You can create customer-specific InfoSets by copying an existing entry. Take account of your  customer namespace and set the relevant country code.
    Note: The Personnel Number field (P0000-PERNR) must not be added to the InfoSet. If you want to use the personnel number, use the P0001-PERNR field, for example.
    e) In the Sort field of the Output Fields List tab page, you can specify the sort sequence in the hitlist.
    Example: You have selected the Last Name and First Name fields for the hitlist. You want the hits to be sorted first of all by the employees' last name, then by the first name. You therefore enter 1 for the last name and 2 for the first name in the Sort field.
    f) Once you have completed your modifications, choose Check Display Table. If the check was successful, choose Save to save your changes. If inconsistencies were found during the check, a message in the relevant line notifies you of them.
    Further notes
    In certain circumstances, runtime issues may occur, especially in data selection. If they do, set the Selection Fields indicator in the Use Default Settings for group box. This deactivates the use of the InfoSet Query; instead, the system uses the BAPI_EMPLOYEE_GETDATA method.
    You can switch the hitlist and the detail screen to the BAPI_EMPLOYEE_GETDATA method by setting the Output Fields List and Output Fields Detail indicators.
    Note that by setting an indicator, you restrict the field selection in the relevant tab page to the interface of the method.
    If, in the initial screen, you enter a country for which values have not yet been defined, the system automatically creates an entry that sets all indicators in the Use default settings for group box. You can then edit the entry to suit your requirements.
    You can specify whether you want employees' photos to be displayed in the service in the IMG for Employee Self-Service under Determine User Options.
    If this helps, pl do reward.

  • How to export book pdf using custom presets for all book files in indesign using javascript

    How to export book pdf using custom presets for all book files in indesign using javascript.

    Hi jackkistens,
    Try the below js code.
    Note: you can change your preset name in below (e.g, Your preset name).
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
    example:
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
    thx,
    csm_phil

  • Update Power View reports properties using custom code

    Is there any way to update power view reports uploaded in SharePoint 2013 shared data source link using custom code?
    Best Regards,
    Sameer Salunke
    MCTS-Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    Someone out here must have an answer????   I know that SharePoint 2013 saves the view created in Power View therefore the metadata must be accessible somehow?  Can someone explain
    how to find that metadata in the SQL tables maybe?  I would be surprised to find out I am the only one who needs this?
    Ken Craig

  • How to load an applet using custom classloader ?

    Hi All,
    How to load an applet using custom classloader rather than using default browsers classloader i.e AppletClassLoader usually ?
    Regards,
    Kumar.

    I would guess that that would require two applets.
    The first does nothing but create the custom class loader and then load the second applet.

  • ABAP User Roles and Query for accessing particular T- codes and Reports

    dear Gurus
    I have one problem, i want to know about ABAP User Query ,i have one requirement my user wants to Lock all the HR Std versus Customized reports in T- code SQ01,other department peoples also see the Payslips and Hr personal reports which is harmfull to the dept so i want to Lock all the reports in Std T- code in SQ01 and i have created one Customized User Roles or Query in which the T-codes and Reports are assigned only those particular user can access the T-codes and Std reports .how can it be possible i dont have any idea about user roles and Queries .
    kindly help me out or send me some documents related to user roles and queries
    regards ritesh sharma

    Hi Ritesh,
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/103cafc2-7a64-2b10-14b3-eddb7d324561
    Regards,
    Flavya

  • How to query a cube using SQL ?

    Hi I have a MOLAP cube say CubeA with dimensionA having Attribute A1 and dimensionB having attribute B1
    the measure of cube is M1.
    Any idea how i can query the cube using SQL dislaying both the dimensions with the measure interlinking them.
    I just need a general overview of how to sql query a cube .. I have the dimensions and sttributes and name of the cube but i ineed to know how to query it... I was given an example
    SELECT
    t.time_long_description,
    p.product_long_description,
    c.customer_long_description,
    f.sales,
    f.sales_ytd
    FROM
    time_calendar_view t,
    product_std_view p,
    customer_std_view c,
    sales_cube c
    WHERE
    t.dim_key = f.time
    AND p.dim_key = f.product
    AND c.dim_key = f.customer
    AND t.level_name = 'CALENDAR QUARTER'
    AND p.level_name = 'BRAND'
    AND c.level_name = 'STATE';
    but i cant understand it.. i cant figure out what are the dimensions and where are the attributes...
    Any idea would great...

    There's a nice tutorial here: http://st-curriculum.oracle.com/obe/db/11g/r1/olap/cube/querycubes.htm
    Here are a few basics. Note that the link between the dimensions is the join between the dimension or hierarchy views and the cube.
    * The primary key to every dimension and hierarchy view is DIM_KEY.
    * The primary key to the fact table is dim1, dim2, dim3, so all joins are between dim_keys and dim1, dim2, etc.
    * Dimension, hierarchy and cube views contain rows for both leaf (detail) and summary rows (that means cubes can return very, very large numbers of rows is you aren't careful)
    * You typically want to query for the aggregate level data rather than use SUM ... GROUP BY. Let the cube do the work and let it manage calculations.
    * Dimension views contain rows for all dimension member. hierarchy views contain rows for only members of the hierarchy.
    * You typically select one of the long or short description columns to display data within an application.
    Here's a commented version of your query:
    SELECT
    t.time_long_description, -- long descriptions
    p.product_long_description,
    c.customer_long_description,
    f.sales, --measures
    f.sales_ytd
    FROM
    time_calendar_view t, --hierarchy views
    product_std_view p,
    customer_std_view c,
    sales_cube c --cube view
    WHERE
    t.dim_key = f.time ; -- joins between hierarchy and cube views
    AND p.dim_key = f.product
    AND c.dim_key = f.customer
    AND t.level_name = 'CALENDAR QUARTER' -- Filters to ask for data at the quarter
    AND p.level_name = 'BRAND' -- brand
    AND c.level_name = 'STATE'; -- and state levels.
    You want to have a filter on every dimension to avoid return all rows in the fact table for that dimension (remember, the cube contains summary rows). If you want to drop a dimension from a query (e.g., you don't want product in the query, intending for the query to be the aggregate of all products), filter to an all/total level.
    e.g.,
    and p.level_name = 'ALL PRODUCTS'
    or
    and p.long_description = 'All Products'
    There are many variation of this query, but if you understand the basics you'll work your way there.
    And, never do a select count(*) from a cube. Doing so will select the entire cube, detail and summary data.

  • How to add Custom code in Report Painter

    Hi All,
      I have a requirement to add Authorization checks at Profit Center Level for 8A-PCA001G report. This is the first time am working on Report Painter/Writer. I am wondering whether i can add custom code or not. Please suggest me how to do this. I copied 8A-PCA001G into a zreport but did not find anywhere to add custom code.
    Any help would be really appreciated.
    Thanks,
    Kumar

    Hi Kumar,
    You cannot write custom code (0% coding) in an Report Writer/Painter report. The code is generated by SAP while generating the Report group. The only place in a report writer report where you can write very minimal code is at varables level or formulas inside reports.
    At the report group header level, there is provision to provide authorization group. Try that.
    Regards,
    Subin John.
    Edited by: subin john on Mar 24, 2011 10:36 AM

  • File upload in KM using custom code

    Hi All,
    We do keep on getting requests to  frequently upload versions of file in KM for our users, Is there a way where a customised iview can be developed to pick up a file from desktop and upload it in KM ? I think this can be done using Webdynpro Abap or Webdynpro Java not very sure .
    Please guide me with pre-requisites and steps as I am new to such kind of development in portal.
    Regards,
    Jalpa Shukla

    Hi Jalpa Shukla,
    Not sure what you mean by "getting requests to frequently upload versions of file". If you are trying to write some custom code through which you can upload a file in KM (and maintain the document versions). Check [this|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3095f14c-29c5-2b10-f69e-edcb6f0f1367?QuickLink=index&overridelayout=true] link.
    Hope it helps!
    Thanks, Ansar.

  • Create lead via reference to campaign using custom code

    I'm looking for an easy way via custom code to create a lead transaction and include a reference to a campaign object in my system.  I'm having no luck with the XIF doc flow segment for the lead creation and would like to look for other methods to update this link.
    Any suggestiosn on how to code this would be great.  Yes I know that I could do ELM, but then I would need to rewrite my entire program, my leads create properly minus the campaign link.
    As always help will be acknowledge and correct answers given here, will be put in the CRM wiki for future reference.
    Thank you,
    Stephen

    Okay this actually will work via XIF adapter, the trick was proper settings of the related type attribute.  When SAP inserts new doc flow for relations to campaigns it is done via "space" option.  The LV_GUID needs to be GUID of the campaign in question.
      LS_DOC_FLOW-RELATION_TYPE   = 'VONA'.
      LS_DOC_FLOW-RELOBJ_ROLETYPE = 'VORGAENGER'.  "Role A
      LS_DOC_FLOW-RELOBJ_OBJKEY   = LV_GUID.
      LS_DOC_FLOW-RELOBJ_TYPE     = 'BUS2010020'.
      LS_DOC_FLOW-OBJECT_TASK     = 'I'.
      LS_DOC_FLOW-RELATION_TYPE_ATTR = space.
      LS_DOC_FLOW-INPUT_FIELDS-RELOBJ_ROLETYPE = 'X'.
      LS_DOC_FLOW-INPUT_FIELDS-RELATION_TYPE   = 'X'.
      LS_DOC_FLOW-INPUT_FIELDS-RELOBJ_OBJKEY   = 'X'.
      LS_DOC_FLOW-INPUT_FIELDS-RELOBJ_TYPE     = 'X'.
      LS_DOC_FLOW-INPUT_FIELDS-RELATION_TYPE_ATTR = 'X'.
      INSERT LS_DOC_FLOW INTO TABLE LT_DOC_FLOW_XIF_DATA.
    Yep this will need to end up in the wiki once my I'm finished up with the full program/conversion.  I guess I will keep my title as "pied piper"  of the XIF adapter for now.
    Take care,
    Stephen

  • Creating "Payables Account Transaction" using custom code

    Hi Gurus,
    I need a help. I have a requirement that I have to create "Payables Account Transaction" using custom PL/SQL code. Kindly could you advise me as to which API or Package should i use to get this done. Currently I am in 11.5.10.2.
    Pls help me on this.
    Thanks,
    Genoo

    Hi Genoo,
    As mentioned I would reverse the standard journals coming from Payables, that way you can still see what the original journals were and drill back using them. So you don't do anything in the subledger.
    Alternatively if you wanted to get more risky, when you run the Payables transfer to GL, you could choose not to submit journal import and then you could manipulate the AP Journal records while they are still in the GL_INTERFACE (as they also go through that table) prior to going to GL, then you could do whatever you want - and if you don't delete them (but update / copy them) they will still retain the drilldown links back to AP.
    Regards,
    Gareth

  • How to get MAC address using java code

    hi friends
    please write me, How can I get MAC Address of local machine using java code.I don't want to use JNI.
    Please reply me. Its urgent for me
    Thanks in advance
    US

    You have several ways under *nix
    ifconfig -a | grep HWwill output something like
    eth0      Lien encap:Ethernet  HWaddr 00:11:FF:74:FF:B4combined with Runtime.getRuntime().exec("")and Process.getInputStream()you should be able to read it easilly.
    Under Windows (and Linux of course) try jpcap (http://sourceforge.net/projects/jpcap)
    You can also use jnative as a generic tool (http://sourceforge.net/projects/jnative)
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using custom code in SSRS PDF rendering

    Hi,
    I have a written some custom code ( a simple function to maintain a counter ) in SSRS Report properties.
    Everything works fine when I render the report in Report Viewer, but the custom code is not recognized when I render the report to PDF.
    What is wrong with my code?
    There is no error reported. The custom code is just getting skipped when I render to PDF.
    My custom code is as follows..
    Public Shared Dim iCounter AS Integer = 1
    Public Function IncrementCounter(SomeValue As Boolean) As Boolean
    iCounter = iCounter + 1
    Return SomeValue
    End Function
    Public Function GetCounter() As Integer
    Return iCounter
    End Function
    and my call to the custom code is..
    =code.GetCounter()

    Hi ha_emp,
    From your description, it seems that custom code work well when you preview the report. While it would be skipped when the report is exported to PDF. After testing the custom code in my environment,I find that the custom code will run again when exporting
    the report, so when we run the report on Report Server and export it to PDF, the custom code will be run twice, the value will be counted twice.
    Based on my research, I find that we can delete the “Shared” in the first row of the custom code to fix this issue. Then the custom code will works well on Report Server.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks, 
    Katherine Xiong
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to bypass printer setting using abap code?

    Dear All,
    I want to bypass printer setting using abap code?
    I am printing sticker using a code and i dont want to display printer setting .
    I want direct ouput ?
    Regards
    Steve

    Are you using reports or scripts/smart forms? You can use the parameter for no_dialog = space(use the relevant parameter).

Maybe you are looking for

  • Wireless printer

    I connected my Airport Express on my existing wirelle network.I have a wireless printer connected to this network. How can I use this printer?? only using USB??

  • 3 Login attempts?

    How to allow 3 or 5 login attempts, using the standard user auth setup in dreamweaver? I know there is a way using the usual interakt stuff but what if you have no money for that extras? Any ideas? Cheers West

  • IPhone 4 version 5.1 music problems

    Hi,I down loaded iOS 5.1 and icloud to my iPhone4 from my wifes Mac,all went well with my Apps,I even got the Apps from my iPad???".But I can not get my music back,there is no 'purchaced' sign on the dash board.I sent an email to iTunes about 6 wks.

  • Why is Safari suddenly slow to respond?

    Hi, I have an ipad3 and running 6.0.1. For two days now Safari seems to be very laggy when I first select the app. When I try closing or opening a tab the X or + glow for a few seconds before the tab opens or closes. This continues until the "spinnin

  • Items load to second monitor that no longer exists

    I've been using 2 monitors for a long time. For reasons not worth getting into I can have only one now. The trouble is that some things remember they were on the second monitor and still insist on opening themselves to that monitor - even when it doe