SSRS 2008 passing multiple parameters Oracle 10g backend - ssrs-2008

after several years of using Cognos, we are in process of testing conversion of Cognos Reports (8.3) to SSRS 2008 reports. we use Oracle database version 10g. in many of our reports we are converting we pass multiple values in parameters, however i cannot get this working in SSRS pointing to the Oracle datasource.
i have created parameter and set it to allow multiple values. these columns are integer types. the SQL filter is set as follows for example, where vendor_id IN (:Vendor_id). yet when I test the SQL, i get errors. i enter parameter values as comma-seperated for example, 102, 105, 107. errors as follows.
ORA-01722: invalid number
i've tried wrapping value in single, double quotes with same result. is there a different format to meet oracle syntax requirement? does multiple values only work for SQL server databases?
thanks in advance.
joe

As pointed out in this post, multi value parameters are concatenated and used as follows:
Select * from Table WHERE column1 in (:CommaSeparatedListOfValues)
http://consultingblogs.emc.com/stevewright/archive/2009/08/14/14763.aspx
So Vendor_id has to be Varchar2. I guess you have the data type of Vendor_id as integer?.

Related

How to include columns with length greater than 4000 characters in SSAS Tabular Model?

A few of the columns in the source sql view has column length greater than 4000 characters. These are columns which contain some user comments and needs to be inclided in my Tabular SSAS Model.
But whenever the character length is greater than 4000 characters, I am getting error while processing the model.
I found out that Tabular does not support column length greater than 4000 characters.
Is there any way to bypass this issue ?
In Visual Studio 2017 in compatibility level 1400 (SQL 2017 and Azure Analysis Services) I was able to import this query both in legacy data source mode (regular SQL driver) and in the new Power Query mode.
select cast(replicate(cast('A23456789' as varchar(max)),1000) as varchar(max)) as str,
len(cast(replicate(cast('A23456789' as varchar(max)),1000) as varchar(max))) as len
What are you doing differently? Are you using an older compatibility level or something?
I also would question the analytical value of importing huge text strings into an SSAS Tabular model. Can you explain the value of those columns? Can you possibly parse out the relevant pieces of info from the long strings?

Multiple dataset for single tablix in ssrs 2008

I am working on ssrs which uses a table. I need to get values into the table from two dataset which comes from single datasource.
you can define the over all table data set to one of the data sets which is used maximum to pull in the values to the table. For columns which has to use the second data set, in the Expression properties window, select the Dataset from the Catogery list and then you can select the dataset name and the valuew associated with it.
If you're using SSRS 2008 R2 you can use the Lookup() function in an expression in your table to pull in values from other datasets based on a lookup key or other joinable field. Lookupset() would allow you to retrieve multiple records at once if you need to deal with a 1:many relationship.
See here for more:
http://technet.microsoft.com/en-us/library/ee210531.aspx
http://technet.microsoft.com/en-us/library/ee240819.aspx
This will not work if you're on plain old 2008.

Cannot display Dimension Extended Data Types in SSRS from AX 2009

If you use the built in query (EmplTableListPage) from AX2009 and try to build an SSRS report with it and you use the field Dimension[1] (or any dimension field for that matter), the report preview in Visual Studio 2008 will render correctly. After you deploy the report to the SSRS server, it will fail to load with an error similar to:
An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'Dataset1'. (rsErrorExecutingCommand)
The AX query string 'SELECT EmplTable.1.Dimension[1],EmplTable.1.EmplId,DirPartyTable.1.Name FROM EmplTableListPage' is invalid. The valid format is 'SELECT [fields] FROM [AX query name]', where [fields] can be either '*' or a comma separated field list.
If you remove the Dimension[1] field from the report and re-deploy the error goes away and the report renders correctly.
I have tried adding a field to the query in the AOT and adding Dimension[1] specifically but that did not work either (same error message).
How do I display data from the Dimension fields in SSRS reports? and why does it work in Visual Studio but not in AX or the Report Manager Website?
According to Microsoft in their What's New in Microsoft Dynamics AX 2012 for Developers whitepaper, 2012 was enhanced to support dimensions which were not supported in AX 2009 meaning that you can not display data from dimension fields on SSRS reports:
I used this kind of approach (joining all posible Dimensions table combinations) note that example is only for first two dmensions:
Than from ssrs:
SELECT LedgerTable.1.AccountName,Dimensions.1.DimensionCode:NAME(SysDimension),Dimensions.2.DimensionCode:NAME(SysDimension) FROM LedgerTransSRS
By the way my original Query name was not LedgerTransSRS, my original Query name was LedgerTransSRS_companySufix I erased the _companySufix for this example. So do not modify original LedgerTransSRS query (because it`s exists in and is being used in SYS layer).
had the same problem but was able to resolve it.
When you add the data set in SSRS you must add all fields in the dimension (your query has the dimension listed in fields) - and not just the field of the dimension that you want to access.
So the query for the dataset in ssrs should be:
SELECT * FROM EmplTable
The part of your query that is causing the error is: EmplTable.1.Dimension[1]
Get all the fields in your query in the dataset in SSRS and it should solve the problem.

SSIS Data Flow overflowing on dates

I have a FoxPro data source, and the destination is SQL Server 2008.
On the FoxPro side, I have a column with the Date data type. That's a width of 8, min value is 0001-01-01 and max is 9999-12-31. On the SQL Server side, I have a datetime. Also a width of 8, min value is 1753-01-01 and max is 9999-12-31.
In my SSIS Data Flow task, I have an OLE DB Source component that reads in the FoxPro table. The columns are mapped as DT_DBDate in both External and Output Columns. The OLE DB Destination to the SQL Server table takes that columns and flows it to a DT_DBTIMESTAMP. I'm sure that DT_DBTIMESTAMP can handle these date ranges adequately, and reasonably sure about DT_DBDATE (but am having trouble finding it in MS documentation).
The Problem
When I execute the task, I've been having trouble with it failing and complaining of "Invalid date format" and then "Conversion failed because the data value overflowed the specific type" when it encounters values from around the early 1900s, to values over 2050. I'm not exactly sure where I've gone wrong.
Bonus Question
How can I handle overflows in my data flow task?
you might want to do a simple VFP query looking for the records that are beyond the range such as a VFP query of
select * from yourtable
where YourDate < date( 1753, 1, 1 )
or YourDate > date( 9999, 12, 31 )
look at those records for problems...
Additionally, look at other columns that may be causing your boundary issues
I think you need to decide what do you want to do with your data
If you want to load it as it is, you need to change field data type so it will be able to hold the data.
Or if you any wish to correct wrong data you would need to validate and transform it.
If you willing to spend some money please consider using Advanced ETL Processor.
It works with Text, XML, Excel, Access, DBF, Foxpro, ODBC, OLE DB, MS Sql Server, Oracle, MySql, PostgreSQL, Firebird, Interbase, SQLite, POP3, SMTP, File System, FTP, SSL and Unicode.

Crystal Reports XI with Oracle Function wm_concat()

Within Crystal Reports XI I'm trying to have a SQL Expression Field with Oracle 10g function wm_concat(column_name). It appears that Crystal Reports XI is not handling this function properly. If I execute the function wm_concat() within the database, it works fine, however, when trying to use it in Crystal Reports it displays a blank page. Whats interesting is that this field is within a sub-report, yet the whole report displays as a blank page.
Crystal Reports can tell at design-time that this function is valid (It doesn't let you save the SQL Expression if its not valid). So its a runtime error. I have also tested using various Oracle functions such as TO_CHAR() and REPLACE() and these all work fine with Crystal Report SQL Expressions. Any ideas?
WM_CONCAT isn't a built-in function, and isn't necessarily installed with a database.
You could try WMSYS.WM_CONCAT, as the function is actually owned by the WMSYS schema.
You may need to add a specific grant. By default, if it is there, it has EXECUTE granted to PUBLIC but your DBA may have revoked that and replaced it with specific grants.
I couldn't get WM_CONCAT to work; Since the queries execute flawless in Oracle, but not in Crystal Reports I would assume it is something within Crystal Reports. I ended up having to make a PL/SQL Stored Procedure and call it from the Crystal Report. I called the Stored Procedure from a SQL Expression Field within Crystal Reports.