Dates Displayed yyyy-mm-ddd In VB.Net TextBox From SQL Server - sql-server

I have a problem on one computer running my application.
The application (vb.net) connects to SQL Server and one of the bound fields is a date.
On 4 computers it is displayed correctly (dd/mm/yyyy). However on one computer it is displayed as it is in Management Studio which is yyyy-mm-dd.
All 5 computers login with the same username and this username's language has been set to British in Mangement Studio.
I have also checked the date/language settings in Windows XP and they are the same on all computers.
Does anyone have any idea what could be causing the reversed date on the one computer?

Use the .ToString("dd/MM/yyyy") method to display it correctly.

I solved it by using the Binding.Format event.
Thanks for your suggestions anyway.

Related

SQL Server Management Studio does not use color in text editor

I currently have an issue with my SSMS since my PC has been reformatted with windows 10. It doesnt show any functions name with the correct color (should be pink), string (should be red), JOIN (should be grey), etc.
The only keyword it recognize are SELECT, INSERT, PRINT, TRANSACTION and couple more. I checked into my font & colors settings and they are set correctly. I even reinstalled twice without any difference.
EDIT:
Here is an image of how it look like, its a link because i am not allowed to embbed an image directly
EDIT2:
Here is my settings on SQL System Function
I finally found the solution. My Tools -> Options -> International Settings -> Language was set to "Same as Microsoft Windows" which is French. But the rest of my interface is in English. I guess there is a bug where the Setting are in French, but the Editor in English and cant find the color coding properly.
Hope it can help anyone with this problem!
if you would like set all the color back, 1.Tools -> 2.Option -> 3.Environment -> 4.Choose Text Editor in Show setting for, choose Use Defaults if this does not work, than the same steps above, but choose 'Keyword' in Display items in step 4, choose any color you prefer.
UPDATE
Update, GETDATE() and etc are not in keyword catalog, they are in SQL System Function,check that again
2nd UPDATE
In the SSMS, View - Registered Servers to check whether your local Server get registered in Database engine, if you do not see you local computer name shown in Local Server Groups, right click that, hit Task, then Register Local Server
3rd UPDATE
I think you need to restart SQL server database engine instead of restating SSMS only, you could restart it by right click the database engine name, hit restart, if that does not work, try to reboot your local machine

Missing Schemas in Crystal Reports

A little bit of an odd issue here.
I have a database, hosted on SQL Server 2008 R2 (SP2), that has 10 different schemas that could be used for reporting purposes:
Please note, for company compliance reasons, I did redact this image to the bare essentials.
Now, when I go to create a report, and connect to the database in question, the only schemas that are presented to me are those starting with lm_:
Again, redacted...
Now, for the purpose of the report I need to build, I need to be able to select against tables that are in one of the ls_ schemas.
My question is, in Crystal Reports 2013, how do I make all available schemas visible for use in a report?
Other important things to note:
I am able to log into SSMS as the same account I am using to connect to the database in Crystal Reports, and am able to successfully run queries against the schemas in question.
The account I am connecting to the database as, in both SSMS and CR, has full administrative access/capabilities against all schemas in the database in question
Points 1 and 2 would suggest that this is not a security related issue
I am connecting to the database in CR through an ODBC connection created on my system through ODBC Data Source Administration (32-bit) - as a System DSN
The ODBC Data Source uses the same administrative account being used directly in CR and SSMS
Thank you in advance for your help. Please let me know if there is any additional information that I can provide to help solve this issue.
I faced similar issue few years back, and as per my experience it has nothing to do with database and it is within the crystal reports where a registry value is set to minimum value which will restrict the display of schemas or tables
Check below link which will show you the path to change registry.
forumtopics.com/busobj/viewtopic.php?p=1004707
I would suggest you to first take back up of the original data and then change the value
Maybe this:
On the menu bar, select File –> Options.
Click the “Database” tab.
Uncheck the “Stored Procedures” option.
Someone on another forum said that worked but he did not know why.
There is a setting in Crystal under File-->Options-->Database where one can set owner like %. Perhaps your Crystal install has an old setting limiting your visible schemas?
For any one in 2022 who is facing this problem. Check the following:
Open odbc, 32 bits odbc.
Select your datasource and click configure
Click details
Select Metadata tab
Uncheck Disable Schema support and click Ok.
Solved, this is tested and working

Crystal Report not running - Database Logon - Prompt

I am getting this report not running, going to the database. I have to login to get it to work and it will work, but I don't want the users to have to log in. I have checked the connection. It connects from the boxes to the database in odbc. This report completely works before it is promoted. It is promoted from 4.1 to 4.1. Other reports using the same database are working, but others are still giving this prompt as well. Most are working, and they are using the same connection in BOE. This exact report works in Dev. Do you have any ideas?
In BOE when you upload the report, Right click and go to database configuration there select appropriate driver and provide database login credentials.
After providing the details select the radio button that will tell use the same database details every time... probably 3rd option and click on save.
Hi I fixed it by reinstalling the native client

Why aren't my charts in SSRS 2012 displaying?

I recently moved several reports over to a new server. Everything works fine displaying tables and data, but charts are not displaying properly. It looks like the image is not rendering properly. My initial thought was that this was a permissions issue, specifically that the service account used to run SSRS needed permissions to a certain folder on the server that is used to generated chart images, but I can not find anything about this in searching for a solution.
This happens with old reports that display fine on the original server and new reports I try making on the new server.
EDIT: SSRS logs are showing a generic error in GDI+. Looks like this may be the issue, especially since this is running on a virtual server:
http://social.technet.microsoft.com/Forums/en-US/37ed20b2-99bc-4e36-a14b-c9f8cc297be3/ssrs-2012-reports-with-charts-generic-error-in-gdi-?forum=sqlreportingservices
I am curious about a point made in this question:
2) Ensure write permissions on the "folder to which SSRS caches the charts"
Well, firstly, I have not found a single article on the net as to
where this folder is; however, I tested this locally on the server
while logged in as Administrator with full privileges. This doesn't
seem to apply to my situation either.
Does anyone know about this folder? I would imagine that running while logged in as an admin would not mean anything since the service account running SSRS would need the correct privileges.
Someone had a similar problem and the solution was to repair the SQL Server installation. I know it is quite long to run but it might be worth a try.
Equivalent topic in SO
You can try restarting the report server. That worked in my case with Sharepoint and SQL Server 2012. Or repair the SQL server installation on the server as some posts suggest.
SSRS 2012 Charts Not Rendering
I had the same issue when deploying a new report locally.
I restarted my Report Server service and the reports rendered fine.

Automatically print SSRS report?

Is there a way to automatically print a SQL Server Reporting services (2005) report?
EDIT:
We needed to print a SSRS report at a network printer programmatically. Specifically, we wanted to fire this off from a stored procedure. We are currently using likeabanshee's method, and it is working. However, we would like something more managed, without the dependency on Adobe Acrobat and xp_cmdshell. We are looking into this method suggested by Paul G.
You should be able to make that happen programmatically using the built-in web service to render the report. Some sample code for SSRS 2000 is here, but it should be pretty close to what you'd need for 2005 as well I think:
If you use the Microsoft Business Intelligence Editor to create your SSRS, you can write code to fire off a print job.
This question was posted by a co-worker for me. My comments and resolution follow:
Background:
I essentially wanted to fire off SSRS reports to networked printers at our corporation through their UNCs. I have a real-time quality monitoring app (for an industrial manufacturing facility) running from SQL Server. As severe defects are detected I wanted to send a report to QA printers for them to analyze the defects. It also supplements our pager/email alerting system to stop problems as they are occuring.
Solution:
I wrote a SQL stored procedure to monitor the quality failures. As they are detected, the stored procedure calls a .Net console app using xp_cmdshell, passing the product ID, UNC path, report name, Adobe Reader file path (on the SQL Server) and a few other parameters. Note the console app resides on the same server as the SQL Server. The console app accepts the paramters and passes them to SSRS with an output format of PDF. The PDF is created and saved locally, then the console apps runs a command line using Adobe Reader's hidden run mode (/t). The file path and UNC path are passed as parameters, and voila - automatic printing of SSRS files.
An optional parameter tells the console app whether to delete the locally saved PDF.

Resources