SQL Report Builder Query

Hi
I've just started using SQL Report Builder to try and design some reports for work but have come across an issue, basically the report focuses on 2014 by displaying sales items by debtor,
qty and value, however when another year is added and the report re-run the report does not include all of the debtors sold to in both years, only the debtors sold to in 2014.
We use SQL Server 2008
Thanks in advance for your help

Hi Paullo15,
According to your description, you can't get all expected records after your add a year in your report. Right?
In this scenario, we want to know how you add this year in your report. We suggest you re-execute your query in SSMS and Query Designer to see if they can return same proper records. Also we need to know how you design the report. We suggest you use table/matrix
to render the data.
Please share some screenshots about the report design, report preview and quert result if possible. Thank you.
Best Regards,
Simon Hou

Similar Messages

  • SQL Report Builder 3.0 Automatic Scheduling feature ?

    Hello All,
    We have installed and commissioned a HMI SCADA solution for Shell Petroleum South Africa, We are using Copa Data Zenon for our HMI solution, Zenon's historian are writing variable values into a SQL database from where we are reading these variables with
    I-net Clear Reports. 
    However, I net  Clear Reports uses a "PLUS" license which is used for the scheduling function. The license is priced based on the amount of CPU Cores the server has and ours has 16 cores so the license is extremely expensive.
    What we need :
    To create a report with values from a SQL Database.
    Report must be able to be scheduled, to run at specific time.
    I have done some testing and used the same SQL queries we used in I-net clear reports.
    SQL Report Builder 3.0 does get the variable values when you hit "run" , but it does not look like there is an automatic report scheduling function ? We want to execute a daily , weekly & monthly report.
    Does a Scheduling feature exist ?? Please advise
    I would highly appreciate your assistance.
    Regards.
    Paul  
    Automation Engineer

    Hello,
    Report Builder 3.0 is just a report authoring tool.You can design and preview the report with Report Builder,or you can publish your report to a report server or a report server in SharePoint integrated mode, where others can run it. There is no schedule
    running function in Report Builder which can processing the report automatically.
    SQL Server Reporting Services Standard edition or high edition support email and file share subscriptions and scheduling. You can create subscriptions that can automatic running the report based on a schedule(daily , weekly or monthly ) and send reports
    to a shared folder or to an e-mail address.
    Reference:Subscriptions and Delivery (Reporting Services)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • SQL Report Builder

    I have an application that uses SQL Report Builder to edit templates.  When I go to add a dataset to add a custom field to the report, I get a permissions error (screenshot Error).  When I check the credentials for the shared datasource, they are
    all grayed out, so I can’t verify the credentials being used (screenshot Error 2).  According to SQL Management Studio, the user credentials have the right permissions.  The weird thing is, I can access the datasets and shared datasource embedded
    in the report just fine.  I just get a permissions error whenever trying to create a new dataset.

    Please provide specifics on the differences (an example please). Things like formatting of dates are very likely to show differently.
    Thanks,

  • How to pass a date parameter from report builder query designer to oracle database

    i'm using report builder 3.0 connected to oracle database. i'm trying to pass a date parameter in the query with no success, i don't
    know the exact syntax. I've tried :
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date('01/01/2014','mm/dd/yyyy')
    it worked perfectly.
    However if i try to put a date parameter "From" instead of 01/01/2014 it will not work, a Define Query Parameter popup window appear and error occurred after i fill
    the values (usually i shouldnt get this popup i should enter the value when i run the report)
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date(:From,'mm/dd/yyyy')
    appreciate your assistance

    Hi Gorgo,
    According to your description, you have problem when in passing a parameter for running a Oracle Query. Right?
    Based on my knowledge, it use "&" as synax for parameter in Oracle, like we use "@" in SQL Server. In this scenario, maybe you can try '01/01/2014' when inputing in "From". We are not sure if there's any limitation for To_Date()
    function. For your self-testing, you can try the query in sqlplus/sql delveloper. Since your issue is related to Oracle query, we suggest you post this thread onto Oracle forum.
    Best Regards,
    Simon Hou

  • Age calculation in report builder query

    I am using SQL reporting services 2008 and report builder I have setup a report where I want to calculate the age of each student. 
    I have table called Students with a DOB field. 
    I want to display the age of each student and also use the age field in a parameter. 
    Any one have any ideas on best way of doing this.

    Hi,
    Below is my query and at the end I am trying to work out the age of student but when I run this I get an error "ORA-00933: SQL command not properly ended". Any one got any ideas.
    SELECT  s.forename, s.surname, to_char(s.DOB,'dd-Mon-yyyy') DOB, s.gender,s.ethnic_or, s.post_code,p.prov_name,e.term_desc,e.fin_yr,e.age_calculation_date,lc.paid_amt,       lc.paid_hrs_term,lc.paid_status,lc.paid_hrs_wk,lc.yearlyentitlement,lc.act_hrs_term,lc.act_hrs_wk,lc.act_wks_term,lc.oth_settings,lc.unpaid_hrs
    FROM     student s, provider p, ey_term e, la_service_provider lp, la_service_provider_detail ld, la_service_provider_service ls, la_serv_prov_child_hours lc, corresp_address c
    WHERE   lc.term_id = e.term_id
    AND             lc.stud_id=s.stud_id
    AND             lc. LA_SERVICE_PROVIDER_DETAIL_ID =ld.LA_SERVICE_PROVIDER_DETAIL_ID
    AND              LD.LA_SERVICE_PROVIDER_SERVICE_ID = LS.LA_SERVICE_PROVIDER_SERVICE_ID
    AND      ls.LA_SERVICE_PROVIDER_ID = lp.LA_SERVICE_PROVIDER_ID
    AND      lp.EARLY_YEARS_PROVIDER_ID = P.PROVIDER_ID
    AND S.STUD_ID =C.entity_id (+)
    select DATEDIFF(YEAR, '20121231', CURRENT_TIMESTAMP) as Age

  • How to add a dynamic table name in Report Builder Query ?

    I have some problem while creating a report in report builder 6i.
    My data is managed as in tables like this abc_012006, abc_022006 etc , so I want to query data according to the month user have selected from the parameter form. Let suppose if user entered 012006 as month year then data must be fetched from abc_012006.
    Can any one tell me the appropriate tip for this problem.
    Message was edited by:
    [email protected]

    Hello,
    Once you get the Data Set create save it as XML and then create a new report off the XML file. Then you can set the data set to the report and the XML is not required any more.
    First, to be able add fields to a report you need to use RAS. Report.Engine doesn't have the ability.
    If you search in this forum you will find lots of examples on how to...
    If you want to create the report then see these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

  • Report builder query

    Hi i have a field in report builder with
    query.FacilityName & " " & query.Address
    what i need is the first part (query.FacilityName) to be in
    bold
    how would i do this?

    Use the string concatenation character (ampersand) instead of the plus sign.

  • SCSM 2012 - Reporting on Service Level Breached Incidents in SQL Report Builder

    Is anyone clever enough to provide the SQL code required for me to run a report showing the id, title, target end date, and support group for any active incident that has breached its SLA?
    I want to run this report automatically each morning and email it but just can't work out the SQL code

    This is an example of a SLO report that I came up with.  I am sure you can adapt it for your use.  It get SLO information on Service Requests.  It's a daily report that brings back both worker and support group information.
    BEGIN
    DECLARE @Now AS SMALLDATETIME;
    DECLARE @TBL_ServiceRequests AS TABLE (
    SLOtarget SMALLDATETIME,
    SLOwarning SMALLDATETIME,
    AssignedTo NVARCHAR(50),
    SupportGroup NVARCHAR(50));
    BEGIN
    INSERT INTO @TBL_ServiceRequests
    SELECT
    SLO.TargetEndDate_4F17E5C2_86D5_05E8_35DE_6E012567DAB7,
    SLO.TargetWarningDate_B98D2C5F_CBA2_8DB9_CA33_E0F808A9801E,
    UD.DisplayName,
    SR_Group.ServiceRequestSupportGroupValue
    FROM DBO.ServiceRequestDim AS SR
    INNER JOIN DBO.ServiceRequestSupportGroup AS SR_Group
    ON SR.SupportGroup_ServiceRequestSupportGroupId = SR_Group.ServiceRequestSupportGroupId
    LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.MT_System$WorkItem$ServiceRequest AS PrimarySR
    ON SR.BaseManagedEntityId = PrimarySR.BaseManagedEntityID
    LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.Relationship as Relationship
    ON PrimarySR.BaseManagedEntityID = Relationship.SourceEntityID
    LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.RelationshipType as RelationshipType
    ON Relationship.RelationshipTypeID = RelationshipType.RelationshipTypeID
    LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.MT_System$SLA$Instance$TimeInformation as SLO
    ON SLO.BaseManagedEntityID = Relationship.TargetEntityID
    LEFT OUTER JOIN DBO.WorkItemDim AS WR
    ON SR.BaseManagedEntityId = WR.BaseManagedEntityId
    LEFT OUTER JOIN DBO.WorkItemAssignedToUserFactvw AS ASTO
    ON WR.WorkItemDimKey = ASTO.WorkItemDimKey
    LEFT OUTER JOIN DBO.UserDim AS UD
    ON ASTO.WorkItemAssignedToUser_UserDimKey = UD.UserDimKey
    WHERE
    SR.SupportGroup_ServiceRequestSupportGroupId IN ({'Your Support Group Ids'})
    AND
    SR.Status_ServiceRequestStatusId IN (7,8,9)
    AND
    SR.IsDeleted = 0
    AND
    RelationshipType.RelationshipTypeName = 'System.WorkItemHasSLAInstanceInformation' ;
    END
    BEGIN
    SELECT @Now = CAST(CURRENT_TIMESTAMP AS SMALLDATETIME);
    SELECT
    [@TBL_ServiceRequests].AssignedTo as [Assigned To],
    COUNT(*) AS [Open],
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
    END
    ) AS [On Time],
    SUM(
    CASE
    WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
    END
    ) AS [Near Overdue],
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
    END
    ) AS [Overdue]
    FROM @TBL_ServiceRequests
    WHERE [@TBL_ServiceRequests].[AssignedTo] IS NOT NULL
    GROUP BY [AssignedTo]
    UNION ALL
    SELECT
    [@TBL_ServiceRequests].[SupportGroup] + ' Assigned',
    COUNT(*),
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
    END
    ) AS [On Time],
    SUM(
    CASE
    WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
    END
    ) AS [Near Overdue],
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
    END
    ) AS [Overdue]
    FROM @TBL_ServiceRequests
    WHERE [@TBL_ServiceRequests].[AssignedTo] IS NOT NULL
    GROUP BY [@TBL_ServiceRequests].SupportGroup
    UNION ALL
    SELECT
    [@TBL_ServiceRequests].[SupportGroup] + ' Unassigned',
    COUNT(*),
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
    END
    ) AS [On Time],
    SUM(
    CASE
    WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
    END
    ) AS [Near Overdue],
    SUM(
    CASE
    WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
    END
    ) AS [Overdue]
    FROM @TBL_ServiceRequests
    WHERE [@TBL_ServiceRequests].[AssignedTo] IS NULL
    GROUP BY [@TBL_ServiceRequests].SupportGroup
    END
    END

  • How do I apply filters or limit the rows on my report using a Date field in SQL report builder 3.0?

    I have a status of completed and a date field in the dataset. The date field is either empty or contains a date. All 2015 dates are holding dates.
    So how can I limit the report to only pull completed status with an empty date or a holding date?
    I have not been able to set an OR option on a date field filter and if I add two filters on the date column one for empty one for > 12/31/2014 then it treats it as an "and" and pulls nothing from the list I have in sharepoint.
    any help will be appreciated.

    Hi MB,
    In Reporting Services, the relationship of  filters is “And”, and there is no option to change the relationship from “And” to “Or”. While we can use “or” operator within the expression to create one filter to integrated all filters to work around this
    issue.
    We can add a filter as follows in the dataset to limit the rows in your report:
    Expression: =Fields!date.Value is nothing or Fields!date.Value>"12/31/2014"    Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Report Builder 2.0 returning duplicate rows in query designer

    Hi,
    I have a query running off a model, when I explore the data in the model and in a standard sql table it returns one row for each record, which include a unique id for each which is correct.
    When I go into report builder query designer, it shows duplicate rows for each record. I have removed and added fields to try and pin point why and the only reason i can come up with is that it runs fine until I add in a field thats varchar(255) or
    varchar(max). This is when it starts to duplicate the records.
    Can anyone tell me why it does this or point me in the direction of how to stop this. I can't edit the query in text to add DISTINCT so thats not an option.
    Many thanks,
    JJSJ

    OK - I have found a partial answer.   By Googling Report Builder and VARCHAR, I found another post which reported problems with the semantic query builder when the underlying table/view was returning columns of type VARCHAR(MAX).   
    On looking at the length setting for the data column in the DSV,  this reported a length of 2,147,483,647 for this field.   This is very odd because on querying the underlying table the largest length that I can find for this column is 191,086
    (which is far larger than I would have expected - I am investigating this separately).
    However, why should the Report Model think that this field contains such a large value?
    Anyway,  the other post that I found reported that they had solved their problem by converting the field to a VARCHAR (255).    I tried this (by casting the column in my View to VARCHAR(255))  and this resolved the problem
    - no more duplicate rows when adding this field to the query!!!
    I also tried CASTING to TEXT and to VARCHAR(8000).  The former did not resolve the problem; the latter did.
    So I have a workaround but I don't understand why.  
    Can anybody explain why having a VARCHAR(max) column in my entity causes duplicate rows.    
    I suspect it is to do with the fact that for some reason the Report Model seems to think that there is an exceptionally long text string stored in this column in one of the rows but that again is a puzzle.
    Thanks
    Richard

  • SQL Server Report Builder Hyperlink Column Not Click-able?

    I have a report with a hyperlink column that works in SQL Report Builder 3.0 desktop, but not on the website where it's shown.
    1. 'Website_Domain' field is the shortened URL (domain) is the
    text seen in the Report column
         (technet.microsoft.com)
    2. 'Website_Url' field is the full length URL which is used in the
    'Go to URL' properties
         (http://technet.microsoft.com/en-us/library/ms159106.aspx)
    ['Website Link' Expression]
    =Fields!Website_Domain.Value
    ['Website Link' Column Properties]
    Action = Go to URL
    Selected URL: [Website_Url]

    Hi pointeman,
    I have tried your scenario on my test environment, but the issue was not reproduced. Please take the following steps as a reference:
    Insert Website_Domain field in the detail row, then type the table header with “Website Link”.
    Right-click the cell which contains [Website_Domain] to open Text Box Properties dialog box.
    Click “Action” in the left pane, select “Go to URL” option with [Website_Url] as “Select URL”. 
    The following screenshot is for your reference:
    If the issue still persists, could you please supply more information about the issue? Such as steps you have taken to add the URL or other else. If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Report Builder Count Column

    How can I build a count column with a where clause based on a query defined in the report builder query screen? From what I can tell the built in count column does not allow the addition or definition of a where clause.
    Thanks

    Hi Ruth,
    Not exactly sure if this will answer your question, but here goes. It sounds like you want to count values based on certain conditions? If the where clause is already in your query, you can use the count function that's available in SQL and allow the database to perform the count for you. Otherwise you can use a formula column in combination with a placeholder column or a summary column to get the conditional count. In the formula column you can use plsql to determine if you want to increment your count or not. Depending on how you do it, you can either just return '1' or '0' from your formula column and create a summary column based on your formula column. Or you can increment a placeholder column from your formula column. If you decide to go with placeholders, I'd suggest reading the online help examples for placeholders as there are a few rules you'll have to go by.
    Hope that helps,
    Toby

  • Coldfusion and SQL reporting service 2005?

    Ive been searching google for hours with no clear answer. How
    can you use coldfusion to pull in an sql report from reporting
    service? Via a web service or wsdl i assume, but how?

    Anwar,
    It's important to get the terms right here.
    SQL Reporting Services is not the same as SQL Server Reporting Services (SSRS).
    SQL Reporting Services refers to an Azure service that lets users develop reports in the cloud. However, it is being retired in Oct. 2014, so you'll want to stay away from that.
    SQL Server Reporting Services (SSRS) is the reporting module that is part of SQL Server. This is a sophisticated tool that lets developers create and publish reports that users can access through various methods. It has schedule and refresh capabilities,
    and can leverage SQL Server Analysis Services (SSAS) and SQL Server Integration Services (SSIS). You'd most likely use SSRS if you're creating sophisticated reports and queries that you don't want your users creating.
    SQL Report Builder is a report creation tool designed for users who want to stay in Microsoft Office. It can be used by developers or end users. 
    http://technet.microsoft.com/en-us/library/dd220460.aspx
    Both environments let you create reports that can be shared (published) on a report server or through SharePoint.
    So it's really a matter of what you're most comfortable using.
    Hope that helps.

  • Adding parameter to a MySQL query in MS SQL Server Report Builder

    So I have a MySQL DB connected to MS SQL Server Report Builder via ODBC connector. Everything is fine, I can execute queries and put the fields into report.
    But I can't add an parameter to the query.
    Example query:
    SELECT column1, column2 FROM table WHERE column3 = (@parameter1)
    The result set is just empty. I think the problem is that I'm using MySQL and not MS SQL. Any suggestion?

    Hello Alan,
    Named parameters like @param works with SQL Server / .NET data provider, but not for OleDB, here you have to use the question mark instead
    SELECT column1, column2
    FROM table
    WHERE column3 = ? and column9 = ?
    When you assign the report parameter to query parameter you have to take care about the order of used ? in query
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • 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

Maybe you are looking for