Situation:
Ein Bericht wertet Altiris-Daten über die verwendeten CPU-Typen aus. In der Spalte [CPU Type] sind Zeichenketten enthalten, in denen Kommata vorkommen können, z.B. "Intel Pentium III processor, model A".
Problem:
Bei einer nachfolgenden Konvertierung in eine csv-Datei führt das zu einer Verschiebung der Spaltenwerte.
Lösung:
In der Spalte [CPU Type] wird mit REPLACE das Komma durch eine leere Zeichenkette ersetzt:
SELECT ServerName, FQDN,REPLACE([CPU Type],',','') as [CPU Type], [CPU Speed], [Number of CPUs]
FROM v_OVPI_Connector_CPUs
WHERE (FQDN IS NOT NULL)
ORDER BY FQDN
Posts mit dem Label SSRS werden angezeigt. Alle Posts anzeigen
Posts mit dem Label SSRS werden angezeigt. Alle Posts anzeigen
Dienstag, 9. Februar 2010
Dienstag, 2. Februar 2010
SQL Server 2005 Reporting Services: customize Date Format
Problem:
The date format in a Reporting Services report is not in the desired manner.
Solution:
In BIDS create or open your Reporting Services project.
Open your rdl-File.
Choose tab "Layout".
Rightclick a table field with date values (for instance "=Fields!TimeSampled.Value").
In context menu choose Properties.
Window "Textbox Properties" opens.
Choose tab "Format".
On tab "Format" choose the elipsys button (...) near "Format code".
Window "Choose Format" opens.
On Window "Choose Format" choose Radiobutton "Custom" and type "yyyy-MM-dd HH:mm:ss" (without quotations).
Click ok twice.
This will generate a date like 2010-01-31 23:59:00.
The date format in a Reporting Services report is not in the desired manner.
Solution:
In BIDS create or open your Reporting Services project.
Open your rdl-File.
Choose tab "Layout".
Rightclick a table field with date values (for instance "=Fields!TimeSampled.Value").
In context menu choose Properties.
Window "Textbox Properties" opens.
Choose tab "Format".
On tab "Format" choose the elipsys button (...) near "Format code".
Window "Choose Format" opens.
On Window "Choose Format" choose Radiobutton "Custom" and type "yyyy-MM-dd HH:mm:ss" (without quotations).
Click ok twice.
This will generate a date like 2010-01-31 23:59:00.
Labels:
Reporting Services,
SQL Server 2005,
SSRS
Abonnieren
Posts (Atom)