How to show data having varchar(max) as data type in Crystal Report - sql-server-2008

i am using crystal report 8.5 and sql server 2008 R2. I have print a column value whose data type is varchar(max). But when i try to print this coulmn value in crystal report, some of the data is not displayed. only half data gets displayed.
How can I print whole data on crystal report. Thanks in advance.

As per I know and If I understand problem correctly, the maximum length of string crystal report supports (per database text field) is 255 characters.

There is a bug in Crystal Reports that mistakenly identifies varchar(max) as varchar(255). You can use varchar(8000) which should be correctly identified by crystal however there's no way I've found to allow over 7999 characters.

Related

SSRS: Caching a shared Oracle Dataset with date parameter

I am using SSRS (2008R2) to create a large report against an Oracle
database.
Because of the size of the report I wanted to cache the shared
dataset overnight.
The dataset has a single parameter which should default to today's
date but be changeable in the report (although this would trigger
another cache).
I have struggled with this for 3 days and wanted to document how I got it to work, as well as get feedback on my approach.
1. Oracle Datasource:
I found that passing parameters to the dataset only worked well for me using the native Oracle drivers, not the OLE DB drivers.
2. Shared Dataset:
I was never able to get SSRS to pass a date parameter to Oracle. In my Oracle query I therefore used the conversion TO_DATE(:EffectiveDate,'YYYY-MM-DD"T"HH24:MI:SS') (you'll see why I had to use ISO 8601 format later).
When adding the variable :EffectiveDate to my SQL query a parameter was automatically added to by shared dataset. This initially caused the Oracle error ORA-01008: not all variables bound. This was resolved by deleting the dataset parameter and then clicking "refresh fields" on the dataset query screen to re-create it. The only difference apparently being that now the parameter name has a colon.
I have set the dataset parameter up as shown below in the screenshot:
The parameter is of type "text" and defaults to today at midnight in ISO 8601 format (=Format(Today(),"yyyy-MM-dd\T\0\0:\0\0:\0\0"))
3. Report Dataset:
The Report Dataset uses the Shared Dataset above and also has a dataset parameter. In this case I want the report dataset parameter to take a date from a report parameter but pass a string to the shared dataset parameter as below:
The Dataset Parameter is set to the value =Format(Parameters!EffectiveDate.Value,"yyyy-MM-dd\T\0\0:\0\0:\0\0")
4. Report Parameter:
The Report Parameter is set to "date" type as below with a default of =Today():
5. Shared Dataset Caching:
First I set the Shared Dataset to use cached data (on the report server via your browser):
Then I set up a "Cache Refresh Plan":
The Cache Refresh Plan seems very picky about Parameter format and it was this last step that only seems to work if passing dates as ISO 8601 compliant strings.
6. Notes:
:EffectiveDate is the name of my Oracle string bind variable and EffectiveDate is the name of my Report parameter. Change your code appropriately.
I was only interested in the date (i.e. not the time). If you need time as well you may need to make some changes.
In order to let the end user know how old the data was, I added an extra column ,SYSDATE AS DATA_AGE to my SQL Query. I was then able to reference the age of the data in my report header with First(Fields!Report_Date.Value, "<report_dataset_name")
I am able to create snapshots of the report but all of the prompts are greyed out, even though all the other prompts only effect report filtering.
To have different prompt defaults in my snapshots I used the test IsNothing(User!UserID). I'd love to know if there was a better way.
My example isn't necessarily in the order in which I set things up (i.e. I reference the Report Parameter before showing its setup).

In SSRS, how to evaluate expression stored in a database table in reprort at runtime

I am using SSRS 2008 R2.
Expressions (specifically date expressions) are stored in a database table.
I fetch that expressions using stored procedure and display it in texbox.
Now the problem is textbox is not evaluating that expression at runtime. Instead it display expression as is (in string. like "Today()" instead of "1/7/2003").
So, in short, i want a functionality as given by Eval() function in VBScript.
So, if anybody tried this please give me sollution or suggestion.
Let me know if any confusion.

SSRS dataset not refreshed after changing MySQL stored procedure

SSRS dataset not refreshed after changing MySQL stored procedure.
I created an SSRS report in which the dataset gets data from MySQL stored procedure. In this scenario the output is generated correctly and so is the report.
Later I modify some content in the stored procedure. I run the stored proc in query designer. In query designer it gives the correct output.
But when going to report if I see the report in preview tab it gives old values. Changed are not coming in presenting report.
Please tell me what's wrong.
Try deleting the MySolution\MyProject\MyRDL.data file -- BIDS caches fairly aggressively.
This is a bug in Visual Studio i think it happens to me as well. Usually closing the report in Visual studio and reopening helps.
the report may be cached on BIDS for a few moments.
re-open it and it should be fine
I TESTED IN VS2012
Note :
1. Go to your Report designer
2. Remember(or copy somewhere) your (A) Data Source Name and (B) Data Sets Name
Now Step 1:
In the Project Solution Explore Delete the Data Set (same name as in Note(A) Data Source Name
) Don't Worry Nothing will bad on your report :)
Step 2:
open the Report data tool of your report
Step 3:
* Select dataSet --> Right Click ----> Select DataSet Properties
* In " data source" click on NEW button---->Next---->
* Select your table/sp/views/-----> Put the Data set Name as:(Note 2. Remember your (A) Data Source Name )
Now Finish... :) now you can get your Newly added field in SP
NOTE : ONLY REMEMBER your old data source and dataset name
Thanks, enjoy ...
Regards,
SRSahoo#gmail.com
Also be sure it's the report and not you.
I switched the sorting fields in the dataset and they weren't changing in the report preview because I didn't change the Grouping.

SQL SERVER 2008 - SSIS Excel Destination

I am currently trying to use SSIS to export a large dataset into an Excel destination, however the issue that i have for one of my columns is that records within it exceeds that maximum amount of characters allowed to export. Currently it is set to 255 using Data type DT_WSTR.
To give you a bit of background I had to use the data conversion tool for a few of my source columns to convert from String [DT_STR] to [DT_WSTR] which partially solved my problem by allowing me to export into excel, except for those records which exceeded the character limit. For now I have just setup a multicast and redirected those records.
Is there any way to get around this?
You need to use a memo data type for columns containing more than 255 characters.
Excel Destination
Saving memo (ntext) data. Before you can successfully save strings longer than 255 characters to an Excel column, the driver must recognize the data type of the destination column as memo and not string. If the destination table already contains rows of data, then the first few rows that are sampled by the driver must contain at least one instance of a value longer than 255 characters in the memo column. If the destination table is created during package design or at run time, then the CREATE TABLE statement must use LONGTEXT (or one of its synonyms) as the data type of the the memo column.
Memo Unicode text stream (DT_NTEXT)

SSRS - MultiValue Parameter "Select All" Problems

I am using SSRS 2008.
I have a multivalue, text, not blank parameter named personID. This parameter's available values are set to a dataset (let's call this dataset PersonQuery), which is tied to a stored procedure. This parameter's default values are also set to PersonQuery. This was working perfectly where when the page/report loaded all possible values for personID were selected.... then I must have changed something (however, I don't remember changing anything..?) because now it is broken... Everything is still fine locally but not once it's on the server.
When I first noticed it was broken only one of the available values was selected. So, I decided to try putting ltrim(rtrim(value)) in my stored procedure without changing any names or aliases.... and updated/refreshed the fields in the dataset to be safe and re-deployed the report to the server. Now, no default values are selected for this parameter when the page loads.
Can anyone suggest anything to try or has any idea about what's going on here??
A quick fix might be to delete the server version of the report and redeploy/upload your .rdl as a new report. SSRS keeps some of the meta-data about reports when a new definition is uploaded to replace an existing report. This includes some attributes of the parameters. This metadata is removed when a report is deleted from the server.
If you delete the server version of the report, you will lose subscriptions, and may need to reconnect the datasource, but if the report is working locally, then I think this will fix the problem.