Issue with SSRS Sub Report while passing GUID as Parameter - ssrs-2012

When trying to send the GUID parameter in the SSRS Sub Report
When trying to invoke sub report, it is throwing following error,
Query execution failed for dataset “xyz” Conversion Failed When converting from a character string to uniqueidentifier
Already Tried Option: https://social.msdn.microsoft.com/Forums/en-US/b3690c51-32fd-42cf-8c40-78407b9c4cc0/failed-to-convert-parameter-value-from-string-to-guid?forum=sqlreportingservices
Which suggest following
DECLARE #guidID uniqueidentifier
SELECT #guidID = CAST(#V_V_1_VarChar_TransactionMSUI as uniqueidentifier)
EXEC G_S_GetTransactionAccountRolesAndCustomers #guidID

As RDL did not understand the GUID, so I would like to suggest to changes this GUID to string at RDL side, In your SP get this as string only and while comparing it with table data, convert it into GUID.
Please reply me if this did not work.

Related

SQLSTATE HY104; INVALID PRECISION VALUE. ERROR IN PARAMETER

I am using SSIS for ETL. Source and destination databases are Oracle.
When I run job through SQL agent its prompts me with the following error:
This table contains 5 date columns which are creating this issue.
I have tried all possible solution but it didn't work. It does not seems data issue as I rerun job on those selective dates which worked perfectly. On full load it failed.
The bottom error message is:
Data Flow: Task:Error: SQLSTATE 22007, Message: [Microsoft][ODBC Oracle Wire Protocol driver]Invalid datetime format. Error in parameter 17.
You have an Invalid datetime format. You need to fix it by correcting either the data or the format model you are using but, since you haven't included any code, we can't help further.
I have a similar issue, the difference is my source is the SQL Server database and the destination is Oracle database.
I converted the source DateTime columns to type String first and then they were loaded to destination date columns successfully.

Crystal report query to Oracle with Allow multi value parameter

I use Crystal report 2011 to create report from with data from Oracle database. I have a Allow multi values parameter name userid (userid is string).
I want to query
Select ... from table where userid in {?userid};
I try {?userid}, ({?userid}), '{?userid}' ... but it's not working.
what should I do?
Put the cursor on the place where you want it, and double click on the parameter.

SQL statement at Birt Report for parameters

Currently I'm using Birt Report to generate report from my system. I'm using input parameter to send parameter from my system to Birt Report. The problem is when I'm trying to send multiple parameter from my system.
SQL statement at Birt Report for one parameter
select actualdate from table1 where storeloc = ?;
When I use this query for one parameter, it work.
I tried sql like this
select actualdate from table1 where storeloc = params["storeloc"].value;
I already created parameter at data set and report parameter but it's still can't gets to work
and also birt dont show me the options in edit dataset for query and Linked To Report Parameters in parameters
so what should i do?
Create a parameter storeloc in report params section of Data source.
Write this query in dataset open:
select actualdate from table1 where storeloc='"+params["storeloc"]+"';
Fetch the actualdate value in data source fetch and run the report.

Crystal Reports not sending parameters to Oracle procedure

I have a new Crystal Report, starting from our company's standard template, which has two connections: one to get some header information and then the Oracle stored procedure. When I run the report, only data for the header shows. That means the connection is working.
When I do a Show SQL Query, I can see the second query is not sending any parameters to Oracle:
OraDB
SELECT *
FROM HeaderInfo RPT
WHERE RPT_NUM = 'RPT829'
OraDB
BEGIN "OraUser"."Proc_829"(:CRYSTAL_CURSOR, NULL, NULL, NULL); END ;
I've entered the parameters, but there is a linkage missing somewhere, because it's just NULLs here. Where do I set that?
I have tried re-creating the report, starting from the same template, and it does not work. I have started a new report, adding my parameter first and then the command for the header, and it does. It just works, and binding those variables isn't something that is normally done manually. But when the binding doesn't work, is there a way to force it?
In my field explorer, it has the following:
- Database Fields
.....+ Proc_829
.....+ Command
+ Formula Fields
- Parameter Fields
.....Divisions
.....StartDate
.....EndDate
When I refresh, it asks for those parameters, which match the parameters that the Proc_829 needs. But it shows no data (the proc runs in Oracle and returns data with those same parameters), and the Show SQL Query, as above, is sending nulls.
The standard is to avoid the use of a subreport, and start with this template. The template was changed recently, but I've used previous iterations and it has worked. The template has the Command and some header information already added, and common parameter fields, which happen to match what my procedure needs.
Edit Here is the opening (obfuscated) part of the procedure:
CREATE OR REPLACE PROCEDURE PROC_829 (
CRYSTAL_CURSOR IN OUT SYS_REFCURSOR
,Divisions IN VARCHAR2
,StartDate IN DATE
,EndDate IN DATE
) IS
-- bunch of stuff here, including
OPEN crystal_cursor FOR
-- my select stuff that returns data in Oracle

VB.NET OLEDBDataReader - Null value in resultset (DATETIME)

I'm new to VB.NET programming, so pointing to examples is greatly appreciated.
I've got a OleDB connection to an Oracle 11g database. I'm reading a single row from a table and trying to populate a row object (mClockInOutInfo). The problem I'm running into is that there is a null DateTime (timestamp) column in the returned row.
Of course, I started with the mClockInOutInfo.RowDate = dr.GetDateTime(0) (assume the RowDate column is the first column in the query).
I quickly found out that nulls should be checked, so I added the = If(IsDBNull(dr.GetDateTime(0)), DBNull.value, dr.getDateTime(0)) to the code. (I now use the NullSafeString functions found around here somewhere. But there was nothing for DateTime types. I tried to make one, no success. So I'm still with the If(IsDbNull(...)) code for my datetime columns.
The problem I'm having is that I get the error: "Specified cast is not valid." when evaluating that statement. I've verified the column type with the .GetDataTypeName(0) method. It returns DBTYPE_DBTIMESTAMP. I've reviewed the schema information to verify that the column is actually the information I'm looking for. From what I can tell, the error is being generated while evaluating the IsDBNull(drRecent.GetDateTime(0)) portion of the if() statement. I've confirmed this by breaking the statement into a multi-line if statement:
if IsDBNull(dr.GetDateTime(0)) Then
...
Else
...
End If
I get the same cast error thrown by the if IsDBNull(...) line.
So, I went back to the SQL string and did a Coalesce on the column with the empty data in it. I received the same cast error. Finally, frustrated, I changed the sql query to use the TO_DATE function and fed in a date string with the appropriate format parameter. I STILL receive this same cast error.
The property in the mClockInOutInfo is defined as DateTime. There are other columns defined exactly the same way and those that have data in the table are not giving any errors.
Any ideas of what I should be doing when the database allows nulls in a DateTime (Timestamp) column? All ideas welcomed. Thank you in advance.

Resources