go backarticles

Articles of SQLschool.gr Team

Επειδή στην σημερινή εποχή τα reports μας μπορούν να τα βλέπουν χρήστες που δεν έχουν απαραίτητα το ίδιο culture με εμάς, είναι σκόπιμο να τους δίνουμε αυτό την εμπειρία καθώς έτσι θα κάνουν καλύτερα την δουλειά τους και εμείς θα έχουμε ένα χρήστη λιγότερο πάνω από το κεφάλι μας.

Σε αυτό το web cast σας δείχνω πως μπορείτε να το κάνετε αυτό μιας και δεν υπάρχει σαν build in διαδικασία μέσα στα Reporting Services.
Επίσης όπως αναφέρω και στο web cast δεν μπορώ να έχω localization στα λεκτικά των παραμέτρων. Αυτό είναι κάτι το οποίο το ζητάμε εδώ και καιρό και μάλιστα υπάρχει και connect item.


Ο κώδικας που δείχνω στο συγκεκριμένο web cast είναι ο παρακάτω


 

CREATE TABLE dbo.ReportTranslations
(
[LabelID] int not null
, [Language] nvarchar(10) not null
, [LabelText] nvarchar(255) not null
);
GO
ALTER TABLE dbo.ReportTranslations
ADD CONSTRAINT PK_ReportTranslations PRIMARY KEY CLUSTERED ([LabelID],[Language]);
GO
INSERT INTO dbo.ReportTranslations VALUES (1,'el-GR',N'Πωλήσεις Διαδυκτίου');
INSERT INTO dbo.ReportTranslations VALUES (1,'en-US',N'Internet Sales');
INSERT INTO dbo.ReportTranslations VALUES (2,'el-GR',N'Ημ/νια');
INSERT INTO dbo.ReportTranslations VALUES (2,'en-US',N'Date');
INSERT INTO dbo.ReportTranslations VALUES (3,'el-GR',N'Κωδικός Προϊόντος')
INSERT INTO dbo.ReportTranslations VALUES (3,'en-US',N'Product Key');
INSERT INTO dbo.ReportTranslations VALUES (4,'el-GR',N'Ποσότητα')
INSERT INTO dbo.ReportTranslations VALUES (4,'en-US',N'Quantity');
INSERT INTO dbo.ReportTranslations VALUES (5,'el-GR',N'Τιμή Μονάδος')
INSERT INTO dbo.ReportTranslations VALUES (5,'en-US',N'Unit Price');
INSERT INTO dbo.ReportTranslations VALUES (6,'el-GR',N'Αξία Πωλήσεως')
INSERT INTO dbo.ReportTranslations VALUES (6,'en-US',N'Sales Amount');
INSERT INTO dbo.ReportTranslations VALUES (7,'el-GR',N'Αξία Φόρων')
INSERT INTO dbo.ReportTranslations VALUES (7,'en-US',N'Tax Amount');

select LabelID,LabelText from dbo.ReportTranslations where Language=@UserLanguage;  

  Public Function GetLabel(P as Parameter, LabelID as Integer) as String Dim i as Integer Dim rv as string rv="" For i = 0 to Ubound(P.Value) If (P.Value(i)=LabelID) Then rv=P.Label(i) End If Next i Return rv End Function

=Code.GetLabel(Parameters!Labels,1)
/*antonch*/

Antonios Chatzipavlis

Antonios Chatzipavlis

Antonios is a Data Solutions Consultant and Trainer. He has been working in IT since 1988. In his career, he has worked as senior developer, IT Manager, Solutions Architect and IT Consultant. Since 1995 he has been devoted on new technologies and software development tools, mainly by Microsoft, either by training company staff and colleagues or assisting them in design, development and implementation as a consultant or chief developer. He has focused in Databases and Data Science since 1995. He specialized in Microsoft SQL Server since version 6.0 in areas like SQL Server Internals, Database Design and Development, Business Intelligence and in 2010 he has started working with Azure Data Platform, NoSQL databases, Big Data Technologies and Machine Learning. He is an active member of many IT communities in Greece, answering colleagues' questions and writing articles in his web site. He is the owner of SQLschool.gr which is a community portal with a lot of information about Microsoft SQL Server. He has been a Microsoft Certified Trainer (MCT) since 2000. Microsoft honored him as MVP on Data Platform due to his activities in SQL Server since 2010. He holds a large number of Microsoft Certifications and Microsoft SQL Server Certifications since version 6.5.


Leave your comment

COMMENT

FULL NAME

EMAIL ADDRESS

We use Gravatar

WEB SITE



captcha


 

Newsletter

If you want to receive updates from us subscribe below with your email.
Follow us in
PASS chapter logo

The Official PASS Local Group for Greece

About us Contact us Terms of Use Privacy Sing in Register
sql school greece logo
© 2010-2020 All rights reserved

This site uses cookies for operational and analytics purposes only. By continuing to browse this site, you agree to their use.