Most recently, in a software product Stimulsoft Reports.Silverlight we added support for the new Office 2013 themes.

Now let's talk more about the features of this theme. We have implemented 8 basic colors, but sometimes our users want to implement a custom theme based on our one, or just slightly change the color palette, as it cannot be good for the customer applications.

If you have the source code of Stimulsoft Reports.Silverlight product, then you can do it. But there are some specific things. The current theme files contain an average of about 5000 lines of code, which consequently complicate the task.

The new theme is so unique compared to the previous ones that, in a few minutes, it is now possible to apply a new color, based on the ready theme, creating a new file which contains only about 15 lines.

How to do this?

In the assembly Stimulsoft.Controls.SL.dll, add a new theme file based on any existing one (for example: MyColor.xaml) into the folder Themes/Office2013.

Further, in the enumeration of StiSilverlightThemes, add a new field in the end (e.g. Office2013MyColor).

And finally, to show a new theme in the designer in the list of settings you need to add the new theme in the Stimulsoft.Report.StiOptions.Silverlight.Themes.ThemeList() method.

The description of resources of a theme being added.

1. office15AppButton2010Background – the color of the MainRibbonButton in the Normal state.

silverlight themes 1
2. office15AppButton2010MouseOverBackground - the color of the MainRibbonButton in the MouseOver state.

silverlight themes 2
3. office15AppButton2010PressedBackground - the color of the panel item in the MainRibbonButton in the MouseOver state.

silverlight themes 3
4. office15ForegroundSelected - the color of the selected tab of the RibbonTab. Identical to the office15AppButton2010Background.

silverlight themes 4
5. office15ButtonMouseOver - the color of the button in the MouseOver state.
6. office15ButtonPressed - the color of the button in the Pressed state.
7. office15ButtonChecked - the color of the button in the Checked state.

silverlight themes 5 7
8. office15SelectionBackground - the color of the text selection in the TextBox.

silverlight themes 8
9. office15ColorButtonMOBackground - the background color of a big button in the MouseOver state.
10. office15ColorButtonPRBackground - the background color of a big button in the Pressed state.
11. office15ColorButtonMOBackground - the border color of a big button in the MouseOver state.
12. office15ColorButtonPRBackground - the border color of a big button in the Pressed state.

silverlight themes 9 12
Quite recently, some pages of news blogs were filled with very exciting news. A well-known company Microsoft announced its intention to "expand". Yes, yes, and it is not the release of a new operating system or service packs. Microsoft intends to produce gadgets. But do not afraid that this commercial giant will retire into its shell. According to CEO Steve Ballmer, the partnership with the manufacturers of the devices will not stop.

Own gadgets from Microsoft! What should we expect and what should we be ready for?

Their first child will be the tablet PC called Surface based on the operating system Windows 8. This tablet PC will actively use Cloud Microsoft services. The Surface will also get the latest mobile version of MS Office. Isn’t that interesting?

Naturally, Microsoft is not going to be limited with this achievement.

Apart from the development of cloud services for business, Microsoft is going to make a really big step forward. We all watched fantasy films, where devices are controlled by a light finger touch, gesture or voice. Apparently, Microsoft developers also watched such movies and decided to materialize those ideas.

Now, it is hard to imagine how far the developers run and what result we will see. But who can keep us from dreaming? Just imagine - more intuitive technologies, unified phones, tablet PC’s, computers work under a single operating system Windows.

Any business will have the opportunity to grow faster, because familiar and reliable technologies will be literally at hand.

These are the perspectives. Neither more nor less, but Microsoft intends to take a place in the advanced high-technology areas, but also crowd the existing giants.

We can follow this and hope that the company will bring its ideas to something ready. After all, when devices available it is much easier to use many programs, because the operating system will be developed ​​for the existing gadget but not a mythical assembly of an ally.

Such a change in the company policy explicitly says about its progress. The gadget emperors appeared in recent years and it would be foolish to such a power like Microsoft to stand on the sidelines. We can safely say even if Microsoft is not the first but it is in the group of leaders.

It remains to follow the development and, keeping up with them, supplement the market with excellent reporting tools.
Introduction

The invoice is most often used in accounting for the tax (customs) control or in the international supply of goods. This document usually includes the cost of transportation, shipping operations, insurance, payment of export duties, as well as various taxes (fees), and more. If your activity requires constant creation of invoices, for optimization, time and cost savings, it is logical to assume that it is easier to create a document template. Using it, you change only the data, saving yourself from routine work to create the structure of the invoice and its design.You can create templates and tools in many ways, but I want to help you save time in finding these resources. In this tutorial you will learn how to quickly create an invoice template, decorate it and get the finished document. This will take you some time. I will try as much as possible to describe in detail the process of creating such a report.

Background

The product which is used in this tutorial is Stimulsoft Reports.Net which trial can be downloaded at:
http://www.stimulsoft.com/downloads/StimulsoftReports.Net_2012.1_Trial.zip

The database to this tutorial is delivered with the product installation. The video file which shows how to create this report is avaialble at Youtube.

In order to create an invoice, you should do the following steps:

1. Run the designer;

2. Connect the data:
2.1. Create New Connection;
2.2. Create New Data Source;

3. Put the DataBand on the page of the report template;

4. Put the HeaderBand above the DataBand. The picture below shows an example of the report template with the bands on the page:

01

5. Edit the bands DataBand and HeaderBand:
5.1. Align them by height;
5.2. Set the properties of the DataBand. For example, set the Can Break property to true, if you want the band be broken;
5.3. Set the background color for the bands;
5.4. If necessary, set Borders;
5.5. Set the border color.

6. Specify the data source for the DataBand using the Data Source property from the object inspector:

02

7. Put text components in the HeaderBand with texts Unit Name, Description, Qty, Item Price, Total;

8. Put text components in the DataBand with expressions. Where the expression is a reference to the data field. Put text components with the expressions: {Products.ProductName}, {Products.QuantityPerUnit}, {Products.UnitsInStock}, {Products.UnitPrice}, and {Products.UnitsInStock * Products.UnitPrice};

9. Edit Text and TextBox:
9.1. Drag the text components on the DataBand and HeaderBand to the appropriate places;
9.2. Set the font parameters: size, style and color;
9.3. Align text components by height and width;
9.4. Set the background of text components;
9.5. Align text in text components;
9.6. Set the properties of text components. For example to set the Word Wrap property to true;
9.7. If necessary, include Borders of text components;
9.8. Set the border color.

The picture below shows the report template:

03

10. Click on the Preview button or invoke the report viewer, using the shortcut key F5 or the Preview item. After rendering a report, all references to the data fields will be replaced with data from the specified fields. That data will be taken sequentially from the data source that was specified for the given band. The number of copies of the DataBand in the rendered report will be equal to the number of rows in the data source. The picture below shows the rendered report:

04

11. Go back to the report template;

12. Add the FooterBand on the report page and edit it;

13. Put text components in the band with the expression Items per page: {cCount (DataBand1)} and edit this text component;

14. Add Rectangle, so that the upper points are located on the HeaderBand, and the lower ones on the FooterBand;

15. Add cross-primitives, which start points are located at the top of the HeaderBand, and the end ones - on FooterBand. The picture below shows the report template with the FooterBand, rectangle and primitives:

05

16. Add the ReportTitleBand to the report template and FooterBand and edit them;

17. Put a text component in the FooterBand with the expression Total: {Sum (Products.UnitsInStock * Products.UnitPrice)};

18. Put a text components in the ReportTitleBand with expressions:
18.1. The first text component has the text BILL TO;
18.2. The second one indicates Name Street Address Address 2 City, ST ZIP Code;
18.3. The third component with the text SHIP TO;
18.4. In the fourth component the text is the same as in the second one Name Street Address Address 2 City, ST ZIP Code;
18.5. Put the text Invoice # 123456 in the next component;
18.6. Put the expression Invoice date {Today.ToString ("d")} in the sixth component in this band;
18.7. And in the last component put Customer ID 123;

The picture below shows a report template:

06

19. Click on the Preview button or invoke the report viewer, using the shortcut key F5 or the Preview item. After rendering a report, all references to the data fields will be replaced with data from the specified fields. That data will be taken sequentially from the data source that was specified for the given band. The number of copies of the DataBand in the rendered report will be equal to the number of rows in the data source. The picture shows a report with the report header and footer:

07

Adding styles

1. Go back to the report template;

2. Call the Style Designer;

The picture below shows the dialog Styles Designer:

08

3. Click the Add Style button to start creating a style. Select Component from the drop down list. Set the Brush.Color property to change the background color of a row. The picture below shows a sample of the Style Designer with the list of values of the Brush.Color property.

09

Press the Close button when the property is set. After that, in the list of values of properties ??Even style and Odd style the new values will appear, i.e. the new style of even/odd lines, respectively.

4. Render a report by clicking on the Preview tab or call the report Viewer using a hot key F5 or by selecting the menu item Preview. The picture below shows the rendered report with the invoice:

10

5. Go back to the report template;

6. Save the report template, for example, as Invoice.mrt.

The invoice, can be printed, saved to any of the available file formats, or send it via email. The picture below shows is a list of file formats available for saving or sending via e-mail:

11

The report can be saved from Visual Studio. To do this, add the following code in your project:

StiReport report = new StiReport();
report.Load("с:\\Invoice.mrt");
report.Show();
The new versions of Windows 8 and Visual Studio 2012 are available for public usage. Naturally, it has been carefully examined by our experts. Their opinion will now be expressed by the chief specialist of the development department Anton Lozovsky:

"Our team has started working with the very first beta version of Windows 8. We tried to work on it and test new features. There have been attempts to write some code on first versions of VS.

The first demo version of Visual Studio was totally raw. It was so unreliable that refused to work stably even on computers stuffed with the top-end hardware components. Due to the fact that our team uses the latest workstations (updated last time before the official release of Windows), it is difficult to imagine how Visual Studio could behave on typical machines.

Regular hangs after simple operations, extremely inconvenient and poor interface. Very soon prereleases with fixes became available, in which the interface was improved, but the performance remained the same. This new version of the Visual Studio continued to throw errors.

There was a feeling that fixes of one problem were replaced by new ones. Prerelease versions of Windows were covered with the same problems.

Finally the version of Windows 8 became available. We downloaded it from the official website. The operating system worked much better than its previous version. Most of the errors and deficiencies have been corrected. However it is much pleasant to work in Windows 7. Together with the operating system we have downloaded a new version of Visual Studio. What can I say about it?

The appearance has undergone tremendous changes; it has become really beautiful and attractive. However, many problems are not corrected until now. While testing the beta version of Visual Studio, we identified a number of errors, wrote about them to the VS support team and they promised that the release version will fix everything. But, unfortunately, everything remains as before. The promises of the realization of requested features still remain promises.

In the previous version of Visual Studio, our product has worked steadily, without any problems and errors. Running the product on the new studio, the project behaved unexpectedly - it threw a lot of bugs and refused to work: it lost ability to compile and got lots of conflicts. Despite all these difficulties, we managed to organize its work, though left an unpleasant aftertaste from the time spent on the development, “killed” with the new version of Visual Studio.

Of course, we understand that this is only the first version. This is only the beginning of development to work with the tablet. We hope that, eventually, everything will be much better."

We offer all our blog readers to personally try out our new product for Windows 8 Stimulsoft Reports.WinRT, which will soon be available officially.
Stimulsoft reports has a web based report designer component that provides full report editing capabilities inside a web browser. Thanks to this component called Designer.Web you can now allow end users to edit reports to their requirements and save the report definition locally or on the server. The best part of the Designer.Web is drag and drop deployment, all you need to do is insert the designer component on an ASP.NET web form and write one line of code to start allowing users to edit existing report or create their own reports. This feature would be extremely useful for minor changes that would normally require developer intervention such as changing color, font or alignment of text or adding a new field to the table or changing the location of the page number.

The salient features of Stimulsoft Reports Designer.Web are:

1. Platform independent (runs on Adobe Flash);
2. Drag and drop implementation and deployment;
3. Option of saving report definition on the web server or on user's computer;
4. Extremely useful for minor changes and updates by end users;
5. Extremely useful for global development teams.
The official documentation and training videos can be found at:
Video Tutorials: http://www.stimulsoft.com/en/videos
User Manual: http://www.stimulsoft.com/en/documentation
Download latest version of Report Designer.Web from http://www.stimulsoft.com/en/downloads
The data for this sample report will come from the AdventureWork sample database provided by Microsoft.
In this tutorial I will show you how easy it is to use the web designer with the following activities


1. Add Reports Designer.Web to your web page
2. Show Designer.Web on Edit button click
3. Create a simple table Report in Designer.Web
4. Add a new connection to the report
5. Add a Data Source to the report
6. Add a Table to the report
7. Preview and Save Report


1. Add Reports Designer.Web to your web page

  • Drag and Drop StiWebDesinger1 from the toolbox to your webpage

Add Reports Designer.Web to web page

2. Show Designer.Web on Edit button click

  • Drag and Drop a button Standard ASP.NET button onto the page and type the text as "Edit Report";
  • Add an event handler for the edit button and add the following line to show the Designer.Web.
protected void btnEdit_Click(object sender, EventArgs e)
{
	StiWebDesigner1.Design(new Stimulsoft.Report.StiReport());
}
3. Create a simple table Report in Designer.Web

  • Start your website in Debug mode by pressing the debug button on the Visual Studio toolbar or by pressing the F5 key;
  • Click on the Edit Report button;
  • Reports designer now opens inside Internet Explorer.

Create a simple table Report in Designer.Web
Create a simple table Report in Designer.Web

4. Add a new connection to the report

  • Select the Dictionary Tab on the right side of the reports designer;
  • Click on the New Item Icon and select a New Connection;
  • Select the SQL Connection and click OK;
  • Type the connection string for the AdventureWorks database;
  • Click test to confirm that the connection string is correct.

Add a new connection to the report
Add a new connection to the report

5. Add a Data Source to the report

  • Click on the New Item icon the Dictionary Tab and select New Data Source;
  • Select Data from the SQL Connection and Click Ok;
  • Type the name of the query in the Name field as Sales;
  • Type the SQL query in the Query Text Field;
  • Click on the Retrieve Columns to confirm that you have all the required columns;
  • Click Ok to see the Sales Datasource in the Dictionary Pane;
  • The following query has been used in the report:
SELECT [SalesOrderID]
[RevisionNumber],
[OrderDate],
[DueDate],
[ShipDate],
[Status],
[OnlineOrderFlag],
[SalesOrderNumber],
[PurchaseOrderNumber],
[AccountNumber],
[CustomerID],
[ContactID],
[SalesPersonID],
st.Name,
[BillToAddressID],
[ShipToAddressID],
[ShipMethodID],
[CreditCardID],
[CreditCardApprovalCode],
[CurrencyRateID],
[SubTotal],
[TaxAmt],
[Freight],
[TotalDue],
[Comment],
FROM [AdventureWorks].[Sales].[SalesOrderHeader] soh
Inner join [AdventureWorks].[Sales].[SalesTerritory] st on soh.TerritoryID = st.TerritoryID
Add a Data Source to the report
Add a Data Source to the report

6. Add a Table to the report

  • Click on the Menu icon and Select New;
  • Select New Report with Wizard;
  • Select Standard Report and Click OK;
  • Expand the Connection and Select Sales as the Datasource;
  • Click Next to select columns;
  • Select all the columns required to be displayed;
  • Continue through all the steps with default settings or change them according to your requirements;
  • Click to see the final report design.

Add a Table to the report
Add a Table to the report
Add a Table to the report
Add a Table to the report

7. Preview and Save Report

  • Please remember to disable the popup blocker for the localhost;
  • Click on the preview tab and select Preview as HTML;
  • The report preview will open in a popup window;
  • Switch to the report designer window and click on the menu icon;
  • Now select "Save As";
  • Click Save again if you have the trial version;
  • Select any location on the local drive to store the report.

Preview and Save Report
Preview and Save Report
Preview and Save Report
Notes:
1. Save As is used to download the report definition on local user's drive;
2. Save is used to save the report on the server side.