I have an issue where I am creating an ssrs report but the table name contains the & symbol which causes an issue when the report is deployed to the server as it is sayjng it is an jnvalid object.
I have surrounded the tables paths like so [dbname].[db].[this&that] just as an example.
I see answers in reference to column names with special characters but nothing dealing with table names. The report works in preview but not when deployed.
Any help appreciated
Related
I have an ETL process set up to take data from an Excel spreadsheet and store it in a database using SSIS. However, one of the columns in the the Excel file is formatted as a percent, and it will sometimes erroneously be stored as a NULL value in the database, as if there was some sort of translation error.
Pictured is the exact format being used for the column in Excel.
Interestingly, these percent values do load properly on some days, but for some reason one particular Excel sheet I was given as an example of this issue will not load any of them at all when put through the SSIS processor.
In Excel, these values will show up like "50.00%", and when the SSIS processor is able to translate them properly it will display as the decimal equivalent in the database, "0.5", which is what I want instead of the NULL values. The data type I am using in SSIS for this is Unicode string [DT_WSTR], and it is saved as an NVARCHAR in the database.
Any insight as to why these values will sometimes not display/translate as intended? I have tried messing around with the data types in SSIS/SQL Server, but it has either resulted in no change or error. When I put test values in the Excel sheet, such as "test" to see if it is importing anything at all from this column, it does seem to work (just not for the percent numbers that I need).
The issue was caused by the "mixed data types" that were present in the first few rows of my data (the "mixed" part being blank fields), which would explain why some sheets would work and others wouldn't.
https://stackoverflow.com/a/542573/11815822
Setting the connection string to accommodate for this fixed the issue.
I have a simple question yet seems not very feasible to be done in BO, perhaps I am missing something basic. Would greatly appreciate any input from the community!
To start with, I have two data providers, universe and excel, and would like to show all records from the universe based on what is provided in excel.
To illustrate,
I have a list of name in excel , and only this one dimension, no identifier or related data attached to these names.
On the universe side, I only have Firstname and Lastname dimensions but not the complete name.
So in order to match them, I would create a new variable called 'Complete Name', which is the concatenation of both Firstname and Lastname.
My question is, how to link the variable I created with the List of Names in excel provider, so that only the record from the universe side that has matching value with List of Names in excel will show?
NB: I do not have authority to change the universe as it is controlled by other group. My version of webi is SAP BI 4.2
*Also, I notice that I can do the concatenation myself via Free-hand SQL, but then again I have no idea how to filter/match based on the list of names in excel.
Please help! Any clue/advice would be appreciated!
I think need to merge on objects that have values in the same format.
If your version of BusinessObjects is 4.2 SP02 or earlier you will have to do the name concatenation in free-hand SQL and merge that resulting column with List of Names from your spreadsheet. In BusinessObjects 4.2 SP03 the capability to merge on variables was added. I have not worked with that version yet, but as I understand it you could leave you universe query as is and create a variable to concatenate Firstname and Lastname and then merge that with List of Names from the the spreadsheet.
If you are getting "This object is incompatible" or something like that when trying to add dimensions see these links on how to create associated detail objects.
I'm using Pentaho report designer 5.2 and 6.0
I have a field which contains translations from the resource-file from our DB.
All our translations are lowercased and I want to put some uppercases in my report. For example the first letter of a word.
How would I do this? I can't find any information on Pentaho forums about it.
Nor an option in style/attributes in PRD itself.
is required to do so in report??, can do this by building the field as prayer using SQL, thus would not have to do anything in the report, only use the field, here I leave an example of how you might do it in SQL, this based on the data source sample data, the explanation would be the siquiguiente, take the first character and took him to uppercase, this will concatenate with the rest of the chain and that's it, hope you serve, sorry for my English, esta rusty , regards
the example:
SELECT
"DEPARTMENT_MANAGERS"."REGION",
"DEPARTMENT_MANAGERS"."MANAGER_NAME",
concat(upper(substr(EMAIL ,1,1)),substr(EMAIL,2,length(EMAIL))) FROM
"DEPARTMENT_MANAGERS"
We are using a database where the front end software has allowed the input of invalid characters. (I have no control or re-writing of the software.)
The types of characters are carriage returns, line breaks, �, ¶, basically anything that is not 0-9, a-z or standard punctuation causes us issues with the database and how we use the data.
I'm looking for a way to scan the entire database to identify these invalid codes and either display them as results or strip them out?
I had been looking at This site wondering if there was a way of searching for a certain range? But I might be barking up the wrong tree.
I'm fairly new to SQL so be gentle with me, thanks.
The only way I could think to do this would be to write a stored procedure which uses system tables to get a list of all fields in the database/schema in question. Have it exclude system tables (or only include those that are user defined) then dynamically write out SQL update statements based on the columns/tables found in the system table inquiries. Using regular expressions or character removal like in this article
The system tables in question are:
SELECT
table_name,column_name
FROM
information_schema.columns
Psudo code would be:
Get list of tables we want to do this for
For each table in list
get list of columns for table that have string data.
For each column in table
generate update statement to strip unwanted characters
--Consider writing out table, column key, before after values to history table. incase this
has to be undone.
--Consider counter so I have an idea of what was updated
execute updatestatement
next column
next table
write out counter
Since you say
the data then moves to a second program that cannot handle these
characters and this causes the process to fail.
I'm wondering if you can leave the unreadable data where it is and create a new column for changed data that's only populated if/when the 2nd process fails. You'll still have to test every character of the data in the failed cell, but you wouldn't have to test every character of every row. After you determine the updated text to process, you can call the 2nd process again with the updated value.
I had a problem in creating the Dynamic report in SSRS. My problem is:
In a table I have stored SQL scripts with the column SQLScripts. If you execute these SQL scripts you get different number of columns for each script.
My problem is, I have one report with buttons of these scripts, for example test1, test2...like that. If you press test1 button this should take the test one SQL script and should display the report with appropiate columns in that sqlscripts.
I can't create individual reports for each test report, they are plenty. Are there any options for me to solve this problem...
The only way I've been able to get this to work sofar is:
Each report has 2 datasets.
ReportData
DataHeaders
The "DataHeaders" need to have the proper name of the datafields in "ReportData". Be careful since SSRS replaces blanks and special characters with "_"
Now, create a table (or matrix) and drag the DataHeaders as the Columns of your report. (This should be a grouped column). If you run it at this point, you'll see all your columns without any data. Now comes the magic:
Create another report that takes a "DataField" parameter. Create another table or matrix within this report and set it's dataset property to be "ReportData". In the DATA cell for the table, set it to the expression =Fields(Parameters!DataField.Value).Value
Now go back to your first report. Right click and insert a subreport. Right click on the subreport and select "Subreport Properties". Under general, select the second report you created to be used as the subreport. Under parameters, select the DataField parameter and set its value to something like =Fields!DataField.Value
In my case I did some formatting in this expression to fix the above mentioned issue with spaces and special characters, since my stored procedure was initially used in ASP.NET and this was just a proof of concept.
Also in my experience the performance isn't great. In fact it was kinda slow, though I haven't had a chance to switch it to use a shared dataset, which I suspect would help a bit. Please let me know if you find a better solution.
I have not found a way to do this completely dynamically. Here is a similar question with some possible solutions:
How do i represent an unknown number of columns in SSRS?
You basically need to create a 'master dataset' from the other Datasets that are based on your multitude of SQL scripts first.The master dataset should contain the data to be presented in it's most simplistic form, i.e. in a simple list format.
Finally, go to the toolbar in SSRS and drag a 'Matrix' into the report. A Matrix table acts similar to a pivot table in Excel or a CrossTab query in Access that will display whatever's in the Dataset.