Quantcast
Channel: SQL Server Reporting Services, Power View 포럼
Viewing all 24955 articles
Browse latest View live

Not aggregating nor detailing

$
0
0

Hi All i have a query that i am planning to use for the SSRS report. I have location 5 levels deep and i have parameters setup for each level. In the back end query i did a count(employeid) over(partition by loc1,loc2,loc3,loc4,loc5) , but in the report when i select "All" selections for each parameter it is no aggregating .

I am expecting to see just one record when i select all values from all parameters. Any suggestions?

Thanks


Licensing 2017 Reporting Services

$
0
0
Is it possible to install SSRS on a separate server, without a database engine, and point it to the licensed server for its own databases, or does SSRS in 2017 require a separate license from the database engine please?

How to call a scalar function in a report?

$
0
0

I have a function that I would like to directly call inside of my report. The purpose of this function is to perform a calculation across tables. Additionally I'd like to pass a parameter to the function. The parameter being a jobNo. So for each jobNo passed it will perform the corresponding calculation.

CREATE FUNCTION [dbo].[GetMoveQty]
	(@JobNo char(10),@foperno int)
	returns numeric(15,5)
	as
	Begin

if @JobNo = ''
Return 0.0

		Declare @fMoveQty  numeric(15,5),
		@fnqty_comp numeric(15,5),
		@identity_column int,
		@LastOpRecno int,
		@fshipqty numeric(15,5),
		@fqty numeric(15,5),		
		@compQty numeric(15,5),
		@OPERNO int

		SELECT @LastOpRecno = foperno from jodrtg WHERE JODRTG.FJOBNO = @JobNo and JODRTG.FOPERNO in (select max(foperno) from jodrtg where JODRTG.FJOBNO = @JobNo)
		SELECT @fMoveQty = fnqty_comp FROM JODRTG WHERE JODRTG.FJOBNO = @JobNo and JODRTG.FOPERNO = @foperno
DECLARE Moveqty_Cursor  cursor LOCAL SCROLL FOR
		SELECT FOPERNO,fnqty_comp FROM JODRTG WHERE JODRTG.FJOBNO = @JobNo ORDER BY FJOBNO DESC, FOPERNO 
IF  @LastOpRecno <> @foperno
	Begin
		OPEN Moveqty_Cursor
		FETCH NEXT FROM Moveqty_Cursor INTO
		@OPERNO,@fnqty_comp 
		WHILE @@FETCH_STATUS = 0
		Begin
		If @foperno = @OPERNO
			Begin
				FETCH NEXT FROM Moveqty_Cursor INTO
				@OPERNO,@fnqty_comp
					set @compQty = @fnqty_comp
				FETCH PRIOR FROM Moveqty_Cursor INTO
				@OPERNO,@fnqty_comp
					set @fMoveQty = @fMoveQty - @compQty
			End
		FETCH NEXT FROM Moveqty_Cursor INTO
		@OPERNO,@fnqty_comp
		End		
		CLOSE Moveqty_Cursor
		DEALLOCATE Moveqty_Cursor
	End
Else
BEGIN
	SELECT @FSHIPQTY = FSHIPQTY + ISNULL(FIDOSHPQTY, 0) FROM JOITEM WHERE JOITEM.FJOBNO = @JobNo
	if @FSHIPQTY > 0
		set @fMoveQty = case when (@fMoveQty - @FSHIPQTY) > 0 then (@fMoveQty - @FSHIPQTY) else  0 end
		select @fqty = sum(fqty) from intran where ffromjob=@JobNo and ftype='M'
	if @fqty > 0
		set @fMoveQty = case when (@fMoveQty - @FQTY) > 0 then (@fMoveQty - @FQTY) else  0 end
END
Return @fMoveQty
END
GO

SSRS Charting

$
0
0

Hi,

I am trying to create a multi-series chart where each series shall have multiple values to be plotted onto the graph.

But whenever i try to view the report the chart displays only one latest value

I am using the below query in my dataset:

SELECT NAME,VALUE,TIME FROM ANALOGDEF WHERE NAME IN ('ABCD','PQRS') AND TIME BETWEEN ? AND ?

Using the above query it is only able to populate the latest value from ABCD Series 1 and latest value of PQRS in Series 2.

Please suggest the possible soultion!

Thanks,

Afshaan Shaikh

SSRS: Cannot view home folder in Internet Explorer as administrator

$
0
0
Hello Guys,

I've been trying to access SSRS reports through Internet Explorer as ADMINISTRATOR but still could not load the home folder. Although I don't have any reports yet since it is a fresh install, I could not view the folder contents and I get this error message:

"Could not load folder contents. You are not allowed to view this folder. Contact your administrator to obtain the necessary permissions."

I tried to check on the Settings as suggested here: https://docs.microsoft.com/en-us/sql/reporting-services/security/grant-user-access-to-a-report-server?view=sql-server-2017. But when I click on the gear icon, the only sub menu is "My Subscriptions". I was expecting Site Settings > Security > Add group or user as stated in the manual.

I've also tried re-installing a couple of times but still the same result. You guys know any fix on this? Thanks!!!

Limiting records per page using =Ceiling(RowNumber(Nothing)/20). Problem with scope of RowNumber on SSRS 2008

$
0
0

Hi,

I'm trying to limit a table to show more than 20 records per page but when I use the =Ceiling(RowNumber(Nothing)/20) I'm getting the following error:

[rsInvalidGroupExpressionScope] A group expression for the grouping ‘Group1’ uses the RowNumber function with a scope parameter that is not valid.  When used in a group expression, the value of the scope parameter of RowNumber must equal the name of the group directly containing the current group.   

My report has a List grouped by a field and inside of it I have the table that I've added the new group. I've already deleted the Sort expression and tried to put the name of the group(Group1) as scope for RowNumber. Can anyone help me?


The RPC server is not listening.

$
0
0

When I try to create a new database in Report Server Configuration Manager, I got this error : Microsoft.ReportingServices.WmiProvider.WMIProviderException: An error occurred when attempting to connect to the report server remote procedure call (RPC) end point. Verify that the Report Server Windows service is running, and then retry the operation.

 ---> System.Runtime.InteropServices.COMException: The RPC server is not listening. (Exception from HRESULT: 0x800706B3)
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)
   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.GenerateDatabaseScript(String databaseName, Int32 lcid, Boolean isSharePointIntegrated, String& script)
   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.GenerateDatabaseScript(String databaseName, Int32 lcid, Boolean isSharePointIntegrated, String& script)

I have the SQL Server 2017 with the SQL Server Reporting Services (October 2017) on my server.

This is the list of what I try to fix this problem :

  • Restart the computer
  • Check if my SQLServer is running on my pc.
  • In SQL Server 2017 Configuration Manager, I check if the SQL Server and the SQL Server Browser are running.
  • In SQL Server 2017 Configuration Manager, I enable TCP/IP in SQL Server Network Configuration -> Protocols for SQLEXPRESS

I need help to fix this problem !

How to make a table to display perticular number of rows per page??

$
0
0

Hi,

Can anybody tell how to ristrict the number of rows per page in SSRS?

I have a table in my report.I know we have to use" =Int(RowNumber(Nothing)/25)" in group expression.But I already have 3 group expression in my table.Where to write??

Thanks.


Reportviewer tool for SSRS

$
0
0

Hi,

I am using Angular 4 as front end and WEB API (.NET) as a back end. For Report creation I am using SSRS report builder (.rdl) file. I am looking for an open source report-viewer. I have tried syncfusion and ngx-ssrs-reportviewer to view my report.  Syncfusion is not open source but ngx-ssrs-reportviewer is opensource. The problem I am facing using ngx-ssrs-reportviewer is authentication. 

Can anyone help me in getting me a nice tool (better be open-source) ?

Thanks in advance


manisha

SSRS Custom Data Processing Extension Error

$
0
0

I am using Custom Data Processing Extension to call a stored procedure. Iam getting following error when creating a dataset in report designer using the extension. I wrote the code in c#.

could not update a list of fields for the query. verify that you can connect to the data source and that your query syntax is correct.(Details-Object reference not set to an instance of an object.)

Here is my code

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using Microsoft.ReportingServices.DataProcessing;
using System.Diagnostics;
using System.Text.RegularExpressions;


namespace DataBaseDPE
{  
    public class DBConnection:Microsoft.ReportingServices.DataProcessing.IDbConnectionExtension
    {
        private string mconnstring;
        private string localname = "Database Connection";
        private ConnectionState mState = ConnectionState.Open;


        public DBConnection()
        {
            Debug.WriteLine("DataSetConnection: Default Constructor");
        }
        public DBConnection(string Dconnection)
        {
            Debug.WriteLine("DataSetConnection Constructor overloaded with Connection String ");
            mconnstring = Dconnection;

        }

        public Microsoft.ReportingServices.DataProcessing.IDbTransaction BeginTransaction()
        {
            return (null);
        }


        public string ConnectionString
        {
            get
            {
                return mconnstring;

            }
            set
            {
                mconnstring = value;
            }
        }

        public int ConnectionTimeout
        {
            get
            {
                return 0;
            }
        }

        public ConnectionState State
        {
            get
            {
                return mState;
            }
        }

        public void Open()
        {
            mState = ConnectionState.Open;
            return;
        }


        public void Close()
        {
            mState = ConnectionState.Closed;
            return;
        }


        public Microsoft.ReportingServices.DataProcessing.IDbCommand CreateCommand()
        {
            return new DBCommand(this);
        }


        public string LocalizedName
        {
            get 
            { 
                return localname; 
            }
            set 
            { 
                localname = value; 
            }
        }

        public void SetConfiguration(string configuration)
        {
            try
            {
                SqlConnection sqlconn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks2000;Integrated Security=True;");
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, null);
            }
        }
        public void Dispose()
        {

        }
        public string Impersonate
        { get; set; }

        public bool IntegratedSecurity
        { get; set; }

        public string Password
        { get; set; }

        public string UserName
        { get; set; }
    }

}

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.ReportingServices.DataProcessing;
using System.Data.SqlClient;

namespace DataBaseDPE
{
    public class DBCommand : Microsoft.ReportingServices.DataProcessing.IDbCommand
    {
        DBConnection mconnection = null;
        private string mCmdText;
        private int mCmdTimeOut = 30;
        private CommandType CmdType;



        public DBCommand()
        {

        }
        public DBCommand(string CmdText)
        {
            mCmdText = CmdText;
        }
        public DBCommand(DBConnection aConnection)
        {
            mconnection = aConnection;
        }

        public void Cancel()
        {
            throw new NotImplementedException();
        }

        public string CommandText
        {
            get
            {
                return mCmdText;
            }
            set
            {
                mCmdText = value;
            }
        }

        public int CommandTimeout
        {
            get
            {
                return mCmdTimeOut;
            }
            set
            {
                mCmdTimeOut = value;
            }
        }

        public CommandType CommandType
        {
            get
            {
                return CmdType;
            }
            set
            {
                CmdType = value;
            }
        }

        public IDataParameter CreateParameter()
        {
            return (null);
        }

        public class MySqlDataReader:Microsoft.ReportingServices.DataProcessing.IDataReader
        {
            private System.Data.IDataReader sourceDataReader;
            private System.Data.DataTable dt;
            private System.Data.DataSet ds;
            private int fieldCount = 0;
            private string fieldName;
            private int fieldOrdinal;
            private Type fieldType;
            private object fieldValue;
            private int currentRow = 0;

            public MySqlDataReader(System.Data.IDataReader datareader)
            {
                this.sourceDataReader = datareader;
            }

            public MySqlDataReader(System.Data.DataTable dt)
            {
                // TODO: Complete member initialization

                this.dt = dt;

            }

            public MySqlDataReader(System.Data.DataSet ds)
            {
                // TODO: Complete member initialization
                this.ds = ds;
            }
            public int FieldCount
            {
                get
                {
                    fieldCount = ds.Tables[0].Columns.Count;
                    return fieldCount;
                }

            }

            public Type GetFieldType(int i)
            {
                fieldType =
               ds.Tables[0].Columns[i].DataType;
                return fieldType;
            }

            public string GetName(int i)
            {
                fieldName = ds.Tables[0].Columns[i].ColumnName;
                return fieldName;
            }

            public int GetOrdinal(string name)
            {
                fieldOrdinal =
               ds.Tables[0].Columns[name].Ordinal;
                return fieldOrdinal;
            }

            public object GetValue(int i)
            {
                fieldValue =
               ds.Tables[0].Rows[this.currentRow][i];
                return fieldValue;
            }

            public bool Read()
            {
                currentRow++;
                if (currentRow >= ds.Tables[0].Rows.Count)
                {
                    return (false);
                }
                else
                {
                    return (true);
                }
            }

            public void Dispose()
            {

            }

        }


        public IDataReader ExecuteReader(CommandBehavior behavior)
        {
            string query = "SampleSP";
            SqlConnection readerconn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks2000;Integrated Security=SSPI");
            SqlCommand readercmd = new SqlCommand(query);


                readerconn.Open();
                readercmd = readerconn.CreateCommand();
                readercmd.CommandText = query;
                readercmd.CommandType = System.Data.CommandType.StoredProcedure;

                readerconn.Close();

                SqlDataAdapter adapter = new SqlDataAdapter(query,readerconn);

                readerconn.Open();
                adapter.SelectCommand = readercmd;

                System.Data.DataTable dt = new System.Data.DataTable();
                adapter.Fill(dt);
                System.Data.DataSet ds = new System.Data.DataSet();
                adapter.Fill(ds);                
                return new MySqlDataReader(ds);



        }

        public IDataParameterCollection Parameters
        {
            get { return (null); }
        }

        public IDbTransaction Transaction
        {
            get
            {
                return (null);
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public void Dispose()
        {

        }

    }
}

Please help me, Thanks in advance

Ring Barcodes not Scanning

$
0
0

Hi Experts,

I need you support,i got stuck in a problem,i came up with a requirement to develop an ssrs report for barcode printing.Issue is that Barcode Label is too small in size,it is 11.79mm in Width and 6.22mm in Height,when it is printed,it gets truncated and not scanned,is there a way to get rid of this? How to fit all barcode bars or lines in first ring text box?

I am unable to elaborate my case here by showing images or links due to account verification,you can see screen shots in this   https://community.dynamics.com/ax/f/33/t/312044    post.




Move all SSRS reports from one server to other server

$
0
0

Hello,

Currently we have one ssrs server(production)  which has 1000 plus reports, we would like to move all these reports to new QA server  from production server.

What is the best way to import all the reports from production server to QA(new server) Server?

Thanks,

Shresth


PDF Renderer renders with mistakes sometimes

$
0
0

I am using the method below to render SSRS reports to PDF. Its always using the same deviceInfo (see below). After rendering some reports i use PDFSharp to combine them into one PDF file. This works fine for some factonIDs but sometimes PDFSharp is throwing an exception "Unexpected token 'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ[...]'". When i open those PDF files with PDF-XChange Editor, i get a warning telling me there were problems with the document which could be solved by saving a copy (see picture below if you speak german). I tried to combine those copied PDF files with PDFSharp and it worked fine. 

The report and device information stays the same. It is only the text and numbers in the report which changes. Why does the renderer create corrupted files sometimes? 

I dont want to manually open each PDF and save a copy to make sure they are not corrupted. 

EDIT: I added AccessiblePDF and HumanReadablePDF to deviceInfo because i was getting a similiar error (Unexpected token 'FactonID') for all rendered pdf files.

<DeviceInfo>       <AccessiblePDF>true</AccessiblePDF><HumanReadablePDF>true</HumanReadablePDF><PageHeight>8.3in</PageHeight><PageWidth>11.7in</PageWidth>                           <MarginLeft>0.2in</MarginLeft> <MarginRight>0.2in</MarginRight><MarginTop>0.2in</MarginTop><MarginBottom>0.2in</MarginBottom></DeviceInfo>
private static void RenderReportToFile(int factonID, string reportName, string fileName, string format, string deviceInfo)
        {
            // Create Web service proxies.
            EPO_Export.reportexecution.ReportExecutionService rs = new EPO_Export.reportexecution.ReportExecutionService();
            rs.Url = "http://blg-factrepd01/ReportServer/reportexecution2005.asmx";
            rs.Credentials = CredentialCache.DefaultCredentials;

            try
            {
                string encoding;
                string mimeType;
                string extension;
                Warning[] warnings;
                string[] streamIDs;

                // Load the report.
                ExecutionInfo info = rs.LoadReport(reportName, null);

                ParameterValue[] values = new ParameterValue[2];
                values[0] = new ParameterValue
                {
                    Label = "Facton ID",
                    Name = "paraProjectFactonID",
                    Value = factonID.ToString()
                };
                values[1] = new ParameterValue
                {
                    Label = "Version",
                    Name = "paraVersionFactonID",
                    Value = factonID.ToString()
                };
                rs.SetExecutionParameters(values, "en-us");

                // Render the report.
                byte[] reportBytes = rs.Render(
                    format,
                    deviceInfo,
                    out extension,
                    out mimeType,
                    out encoding,
                    out warnings,
                    out streamIDs);

                // Write report bytes to a file.
                using (FileStream stream = File.OpenWrite(fileName))
                    stream.Write(reportBytes, 0, reportBytes.Length);
                Console.WriteLine("Report '" + reportName + "' has been rendered successfully for Facton ID: " + factonID.ToString() + ".");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }



report server renders differently

$
0
0
I created an SSRS report in visual studio and then posted the report to my SSRS report server.  I had a piece of logic that changed the font of one of my fields in a Tablix.  The logic works correctly in visual studio and the font changes colors when the condition is matched.  But when that same report is then posted to the report server, the font does not change colors when expected.  I have deleted the rdl.data file and that has not worked.  Therefore I would appreciate any other suggestions

Report Builder Doesn't Recognize Default Printer

$
0
0

If I try and print a report from report builder, I get the warning "Before you can print, you need to select a printer. If you need to install a priniter...blah, blah, blah.

Problem is, the default printer is set right there in the Printer window. There's a green checkmark and everything. If you 'Select the printer, it shows status as 'Ready' but still 'Print' and 'Apply' buttons are not enabled.

I've confirmed the printer works, the page size is 8.5 x 11, so nothing 'weird' is going on with the page or report. It seems that despite the default printer being set, RB doesn't recognize it.



Unicode characters are displayed as square blocks after you paste them from an SSRS report

$
0
0

Hello,

This question is related to the fix that you can find here:

https://support.microsoft.com/en-us/help/3152596/fix-unicode-characters-are-displayed-as-square-blocks-after-you-paste

I'm still experiencing the issue. I'm rendering my report locally using the Microsoft.ReportViewer.WebForms.dll

I tried installing the cumulative update for SqlServer 2016 and fetch the DLL from the GAC (version 14.0.802.134)

I also tried to get the latest version of the DLL from the Microsoft.ReportingServices.ReportViewerControl NUGet package (version 15.0.900.148)

Am I missing something? Where could i find the Microsoft.ReportViewer.WebForms.dll that would contain the fix for the unicode characters displayed as square blocks after you paste them.

Regards

Single Sign on to reports (SSRS 2017) from a Web application

$
0
0

I need to implement Single Sign on to reports (SSRS 2017) from a Web application, The reports would be deployed in a report server and the Web application needs to access reports directly instead of asking for login.

Below solution asked user to login 

https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample 

I have found the below solution for SSRS 2012 but it does not work for SSRS 2017

https://www.codeproject.com/Articles/675943/SSRS-Forms-Authentication

Please help !

Thanks,

Anoop


SSRS column sortable rows by group

$
0
0

I have several groups and each group will have2 columns with some data.

I use the sort able for each column

Try to sort and it will not sort detail row.

Do I miss something here? Please help. Thank you.

SQL_Variant Calculated Float Field - Data Miner to SSRS report

$
0
0

Hey all, first time poster...so my images won't come through yet.

I have a calculated field in a sharepoint list (in project server 2016 on=prem). I am using data miner to retrieve the list so that I can bring the list though to a SSRS report. After running the data miner the field shows sql-variant - calculated in the reporting schema.

When i bring this field into my SSRS report it returns with e.g. float;#9.00000000000000

Questions is how do i strip the syntax and return just a whole number? Do I use an expression in the report or a line of code in the query ?

And what is the expression / code ?! Thanks in advance.

Is it possible to limit SSRS authentication to Kerberos only?

$
0
0

We have an instance of SSRS (SQL Server Reporting Services) which uses Kerberos Constrained Delegation to fetch data for its reports from SQL Server on behalf of its users.

For this purpose, SSRS was configured to use <RSWindowsNegotiate/> authentication option.

Unfortunately, this option allows NTLM sign-in as well. Users successfully login with NTLM, and then get an error when trying to launch a report (because the delegation obviously fails).

There is also <RSWindowsKerberos> option, but unfortunately it's not supported by browsers.

What's even worse, after such NTLM login SSRS won't try for some period of time to get a Kerberos ticket on behalf of a user - even if the user now logs in using Kerberos, even from another browser or from another station. I guess, this is because SSRS launches some session object for the user after successful login, and associates new logins to this session - so until it expires (in ~10 minutes), no delegation would be attempted.

Is there a way to make NTLM logins fail, or at least give user a warning that he should close his browser, wait for some time and re-login by Kerberos?


Viewing all 24955 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>