Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

Node.js Hosting Russia - Use Simple Example Code to GET and POST in Node.js

clock January 27, 2015 06:05 by author Peter

With this post, I will write about using simple Example Code GET and POST in Node.js. In this post, I use this library (Simplified HTTP request client.) And here is the code:

GET
var request = require('request');
// Set the headers
var headers = {
    'User-Agent':       'Super Agent/0.0.1',
    'Content-Type':     'application/x-www-form-urlencoded'
}
// Configure the request
var options = {
    url: 'http://hostforlife.eu',
    method: 'GET',
    headers: headers,
    qs: {'key1': 'xxx', 'key2': 'yyy'}
}

// Start the request
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        // Print out the response body
        console.log(body)
    }
})

Above code will do GET https://localhost:8080/?key1=xxx&key2=yyy

POST
var request = require('request');
// Set the headers
var headers = {
    'User-Agent':       'Super Agent/0.0.1',
    'Content-Type':     'application/x-www-form-urlencoded'
}

// Configure the request
var options = {
    url: 'http://hostforlife.eu',
    method: 'POST',
    headers: headers,
    form: {'key1': 'xxx', 'key2': 'yyy'}
}
// Start the request
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        // Print out the response body
        console.log(body)
    }
})

Above code will do POST https://localhost:8080/ with key1=xxx&key2=yyy in the body.

Handling gzip encoding
To handle gzip encoded response, you will need the compress-buffer library.
var uncompress = require('compress-buffer').uncompress;
// Set the headers and options ...
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        // Handle gzip
        var encoding = response.headers['content-encoding']
        if(encoding && encoding.indexOf('gzip')>=0) {
            body = uncompress(body);
        }
        body = body.toString('utf-8');
        // Print out the response body
        console.log(body)
        // If it is json
        var json_body = JSON.parse(body);
    }
})

HostForLIFE.eu Node.js Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



HostForLIFE.eu Proudly Launches Sitefinity 7.3 Hosting

clock January 26, 2015 10:13 by author Peter

HostForLIFE.eu, a leading web hosting provider, has leveraged its gold partner status with Microsoft to launch its latest Sitefinity 7.3 Hosting support.

European Recommended Windows and ASP.NET Spotlight Hosting Partner in Europe, HostForLIFE.eu, has announced the availability of new hosting plans that are optimized for the latest update of the Sitefinity 7.3 hosting technology.

HostForLIFE.eu supports Sitefinity 7.3 hosting on our latest Windows Server and this service is available to all our new and existing customers. Sitefinity 7.3 offers a natural extension to all customer SharePoint workflows and wrap a compelling presentation around client core business documents. Contextual task-oriented approach to organizing documentation on any topic.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam, London, Paris and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customer can start hosting our Sitefinity 7.3  site on our environment from as just low €3.00/month only.

Sitefinity 7.3 is a Web Content and Experience Management Platform that enables business to engage, convert and retain customers through multiple channels. Sitefinity 7.3 is the only truly mobile web content management on the market that supports all three mobile strategies out of the box – responsive design, mobile apps and mobile sites.

Sitefinity 7.3’s intuitive user interface delights both developers and business users alike, making it a more efficient environment to get more work done faster. There’s no long training required, so even new non-technical users will be up and running in no time. Because it’s built on a modern code-base, Sitefinity is best equipped to meet the long term needs of today’s expanding businesses, including tackling challenges like mobile, ecommerce, multisite management, content personalization, and so much more.

HostForLIFE.eu is a popular online Windows based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market. Our powerful servers are specially optimized and ensure Sitefinity 7.3 performance.

For more information about this new product, please visit http://hostforlife.eu/European-Sitefinity-73-Hosting

About HostForLIFE.eu :
HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, we have also won several awards from reputable organizations in the hosting industry and the detail can be found on our official website.



DotNetnuke 7.3.4 Hosting - HostForLIFE.eu :: How to Fix DotNetNuke Redirect Loop and 404 Not Found Error ?

clock January 13, 2015 05:40 by author Peter

This problem happens especially in the latest versions of DotNetNuke (7.0 or later). It is shortly represented like this: when you install DotNetNuke and everything appearance fine. You log in to your system using your host account and so your homepage keeps refreshing indefinitely. you'll not get rid of that “Getting Started” pop-up. after you manually instert the url of different pages in your web browser url bar (like yoursite.com/contact.aspx), you get a 404 not found error.

To solve this problem, apply the steps below:
1. Find the folder within which your DotNetNuke web site is installed and find your web.config file there and open it (normally, i open it with a development application like Visual Studio or notepad++ for better undestanding however classic Notepad can do fine, too).

2. On the web.config file, you should find the <system.webserver> tag.

3. On this tag, find <modules> tag. And update this tag:
<modules runAllManagedModulesForAllRequests=”true”>

4. Then, Save your web.config file. Close your browser, open it again and open your website. Log in with your host or admin account. You will see that the problem is fixed.

Obviously there may be different components which cause this issue yet i have made bunches of DNN establishments and i've generally figured out how to settle this issue by applying the steps above.

Note: If you have done all the steps and still get a 404 error, than check your default documents in IIS and see if there is default.aspx in there. If not, add it.



Node.js Hosting Spain - HostForLIFE.eu :: How to Make a Visitor Counter in Node.js ?

clock January 6, 2015 05:02 by author Peter

In this article we will actualize a basic hit counter application with a couple of lines of code. We should examine what we truly need to do. We might simply want to actualize a basic hit count for our web server. Case in point, we realize that in ASP.NET application variables are comprehensively shareable and static in nature, as it were if a client changes a worth then all clients will see the changed variant.

In our case we will count the quantity of hits in our web server, and trust me, its much less difficult than you would anticipate. I will assume that the Node.Js server is already up and running in our system. Let’s take a look at the following code.
var http = require('http');
var userCount = 0;
var server = http.createServer(function (req, res) {
    userCount++;
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.write('Hello!\n');
    res.write('We have had ' + userCount + ' visits!\n');
    res.end(); 
});
server.listen(9090);
console.log('server running...')

The illustration is exceptionally straightforward with our past Hello World case. In this case we have pronounced one global variable that is including the quantity of hits our web application. In the server body, from the beginning we are increasing the variable worth and afterward we are sending the quality as a reaction in the wake of setting 200 reaction statuses.

We should run the application. Go to the Command Prompt and explore to your server area. At that point fire the summon:
hub <server filename>

We are seeing that our node server is running. Presently we will go to a program and attempt to get to the server.

At the outset hit, we see that its demonstrating that this is the first HTTP solicitation to our server. Presently, in the event that we hit a few more times then we will see that the number has changed as in the accompanying.

It's demonstrating the quantity of HTTP demands after the node server was up and running. The inquiry may ring a bell, for every single hit, why is the variable not introduced? The reason is, the node.js prepare any work in occasion circle system.

When we make the server and it is up, it will never stop and it will keep on listening for events. For our situation the server is listening for request and response events. Along these lines, when we make one HTTP demand , it executes the code that is composed inside the occasion scope and since we have announced a variable out of this extension, it is never instated the second time.

Conclusion
In this short article we have figured out how to execute a hit counter in a HTTP server utilizing a couple of lines of code. I trust this useful illustration will support you in your node.js day. Happy Coding!



Best DotNetNuke 7.3.4 Hosting with HostForLIFE.eu

clock December 23, 2014 07:52 by author Peter

European leading web hosting provider, HostForLIFE.eu announced support for DotNetNuke 7.3.4 hosting plan due to high demand of DotNetNuke CMS users in Europe.

HostForLIFE.eu proudly launches the support of DotNetNuke 7.3.4 on all our newest Windows Server  environment. HostForLIFE.eu DotNetNuke 7.3.4 Hosting plan starts from just as low as €3.00/month only and this plan has supported ASP.NET 5, ASP.NET MVC 5/6 and SQL Server 2012/2014.

DotNetNuke 7.3.4, as well known in the web industry and familiar among .NET developers, is a Web Content Management System (WCMS) based on Microsoft .NET platform. It is an excellent open source software that you can use to manage your website without having much technical knowledge.

HostForLIFE.eu clients are specialized in providing supports for DotNetNuke for many years. We are glad to provide support for European DotNetNuke 7.3.4 hosting users with advices and troubleshooting for our clients website when necessary.

DNN 7.3.4 is a smaller maintenance release than normal and is focused on addressing the most serious platform issues. DNN 7.3.4 addresses a number of platform issues and should be the last release before DNN 7.4.0. DNN 7.3.4 added ability to save localized lists to resource file, added method to remove all subscriptions from a ContentItem, fixed issue where AUM was not correctly handling 301 redirects, Fixed issue where popup iframe is not initialized correctly and fixed issue where multiple region/country controls in a profile did not work correctly.

DotNetNuke 7.3.4 will be a great content management system that support many advance website features such as blogs, forums, e-commerce system, photo galleries and more. DotNetNuke 7.3.4 is a great platform to build your web presence with. HostForLIFE.eu can help customize any web software that company wishes to utilize.

Further information and the full range of features DotNetNuke 7.3.4 Hosting can be viewed here http://www.hostforlife.eu/European-DotNetNuke-734-Hosting

About Company
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries.



WordPress 4.0.1 Hosting - HostForLIFE.eu :: Installing Google Analytics in WordPress

clock December 16, 2014 06:53 by author Peter

Understanding however guests are getting to your website, what they're looking for and the way they're interacting along with your content is crucial if you wish to become a productive blogger. Google Analytics (GA) could be a nice product able to answer for all those queries. most significantly it’s completely FREE and incredibly easy to set up!

This article will step by step guide you through GA setup on your WordPress site/ blog. The first thing you can do is, register or signup on Google account then Sign Up to Google Analytics. In order to do that, visit the Google Analytics Sign Up page -> log in with your Google account login username and password. You must land on a page which looks similar to this:

CREATE Google Analytics TRACKING CODE

STEP 1. Set up your account
Now you are on the tracking code setting up page. It looks like on the picture below:

Since you would like to make a tracking for your WordPress site, ‘website’ because the property to track. Then you'll be able to choose between a Classic and Universal Analytics. Within the time of writing, Universal Analytics is in a beta version, however it's already stable and can offer you more choices to settle on from within the future, so I extremely suggest to go for this feature, but if you favor the Classic version, the selection won’t influence further steps in the article.

STEP 2: Set up your property
Now, it’s time to share more information about your WordPress site- since it’s pretty self-explanatory- provide Website URL (if your site is available under www. version then provide that bit as well), then choose industry category and reporting time zone and hit Get Tracking ID button. A pop-up window with Google Terms and Conditions will appear- click ‘I agree” and you will be presented with you tracking code, similar to this one:

STEP 3. Select and copy the code
Now, Google ask you to copy and paste this code into every webpage you want to track. Do not close this page, leave it open and go to your website in a new tab (in this way, you can always get back to it).

INSTALL GOOGLE ANALYTICS TRACKING CODE ON YOUR SITE
Since your have a WordPress site, the good news is that installing the tracking code is very easy. There are a few ways to install it and you can choose from one of the following options:

  • Installing a plugin
  • Adding code to HEADER.PHP
  • Adding code to functions.php

1. Installing the Plugin
You need to add Google Analytics tracking code to each page on your site. Next, install the plugin, will help you to do that in a very quick and easy way. There are quite a few plugins available although I recommend this plugin as it is very light and quite easy. To install that plugin, go to your WordPress dashboard Admin Panel, then select Plugins >Add New and type Google Analytics. There will be many search results, but select the Google Analytics created by Kevin Sylvestre - install it and clickt activate it. Then go to Settings> Google Analytics. Here you need to paste the property ID which can be found within your code created in step 5- it has this format ‘UA-XXXXXXXX-X’

2. Add that code to header.php
If you don’t want to install too many plugins on your site (too many plugins, can slow down your website), you can add the tracking code to the header file of your site. Head section (in header file) is used on every single page across your site. In order to add the code, go to Appearance> Editor and find your header.php file on the right- hand side, select the file and paste all code which you copied just before the </head> tag and click on Update the File button.

3. Add code to functions.php
I recommend to go for this solution only if you have experience with PHP and you really know what you are doing! In order to add the code, select Appearance> Editor and find functions.php file on the right side and click on the file. Then copy the code below and paste it at the end of the file.
// Include the Google Analytics Tracking Code (ga.js)
// @ http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html
function google_analytics_tracking_code(){ 
    $propertyID = 'UA-XXXXX-X'; // GA Property ID 
    if ($options['ga_enable']) { ?&amp;gt; 
        &amp;lt;script type="text/javascript"&amp;gt;          
var _gaq = _gaq || [];
          _gaq.push(['_setAccount', '&amp;lt;?php echo $propertyID; ?&amp;gt;']);
          _gaq.push(['_trackPageview']); 
          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
        &amp;lt;/script&amp;gt; 
&amp;lt;?php }

// include GA tracking code before the closing head tag
add_action('wp_head', 'google_analytics_tracking_code'); 
// OR include GA tracking code before the closing body tag
// add_action('wp_footer', 'google_analytics_tracking_code');

After that do not forget replace the UA-XXXXX-X with your property ID.



HostForLIFE.eu Proudly Launches of WordPress 4.0.1 Hosting

clock December 15, 2014 10:14 by author Peter

European leading web hosting provider, HostForLIFE.eu announced the support for WordPress 4.0.1 hosting plan due to high demand of WordPress 4.0.1 users in Europe. HostForLIFE.eu is a popular online WordPress hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (France) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customer can start hosting our Wordpress 4.0.1 site on our environment from as just low €3.00/month only.

WordPress 4.0.1 patches a critical cross-site scripting vulnerability affecting comment boxes on websites running the content management system software. An attacker would need only to inject malicious JavaScript into a comment that would infect a reader viewing it on the webpage or an admin in the management dashboard.
The update also addresses three other cross-site scripting vulnerabilities, a cross-side request forgery flaw, a denial-of-service bug related to password checks, server-side request forgery issues, and what WordPress called “an extremely unlikely hash collision” that could lead to account compromise. WordPress said it also invalidates links in a password reset email if the user remembers our password and logs in and changes our email address.

WordPress 4.0.1 addresses an additional eight security issues, including three other XSS vulnerabilities that can be exploited by a contributor or an author, a cross-site request forgery (CSRF) that can be leveraged to trick a user into changing his/her password, and a denial-of-service (DoS) bug. HostForLIFE.eu is a popular online Windows based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market. Our powerful servers are specially optimized and ensure WordPress 4.0.1 performance.

For more information about this new product, please visit http://hostforlife.eu/European-WordPress-401-Hosting

About us:
HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, we have also won several awards from reputable organizations in the hosting industry and the detail can be found on our official website.



HostForLIFE.eu Proudly Launches ASP.NET 5 Hosting

clock December 8, 2014 10:14 by author Peter

European leading web hosting provider, HostForLIFE.eu announces the launch of ASP.NET 5  support on the recently released Windows Server 2012.

HostForLIFE.eu was established to cater to an under served market in the hosting industry; web hosting for customers who want excellent service. HostForLIFE.eu – a cheap, constant uptime, excellent customer service, quality, and also reliable hosting provider in advanced Windows and ASP.NET technology. HostForLIFE.eu proudly announces the availability of the ASP.NET 5 hosting in our entire servers environment.

ASP.NET is Microsoft's dynamic website technology, enabling developers to create data-driven websites using the .NET platform and the latest version is 5 with lots of awesome features. ASP.NET 5 is a lean .NET stack for building modern web apps. Microsoft built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead.

According to Microsoft officials, much of the functionality in the ASP.NET 5 release is a new flexible and cross-platform runtime, a new modular HTTP request pipeline, Cloud-ready environment configuration, Unified programming model that combines MVC, Web API, and Web Pages, Ability to see changes without re-building the project, etc.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting our ASP.NET 5 site on our environment from as just low €3.00/month only.

HostForLIFE.eu is a popular online ASP.NET  based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu offers the latest European ASP.NET 5 hosting installation to all our new and existing customers. The customers can simply deploy our ASP.NET 5 website via our world-class Control Panel or conventional FTP tool. HostForLIFE.eu is happy to be offering the most up to date Microsoft services and always had a great appreciation for the products that Microsoft offers.

Further information and the full range of features ASP.NET 5 Hosting can be viewed here http://www.hostforlife.eu

About Company
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Their service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, we have also won several awards from reputable organizations in the hosting industry and the detail can be found on our official website.



Drupal 7.3 Hosting UK - HostForLIFE.eu :: Using Drupal Feeds Module to Import Images

clock December 4, 2014 05:12 by author Peter

Importing text content utilizing Drupal feeds module is simple. Importing images utilizing feeds is simple as well however it needs a little function and it's not as straightforward as importing text content.

Initially you need to copy image files in your server, you are able to copy all of these anywhere within your web site directory, however I like copying it to public files directory (sites/default/files). When you've copied the images, you have to produce a CSV importer. Within which CSV importer we'll specify the trail from the image. Look into the feed importer :

Product images is the important subject during this feed importer. Product images is an image field. Right listed below is that the CSV importer :
"SKU";"Title";"Description";"Brief Description";"Taxonomy Terms";"Product Selection";"Product Images"

"IMPORTED-PRODUCT-1";"Imported product display one";"This is an imported product one. This is an imported product one.";"This is an imported product one";"Clothing";"IMPORTED-PRODUCT-1";http://mysite.local/sites/default/files/image1.jpg


When you have already uploaded the image towards the server then you are able to import data by using the CSV.
This was concerning importing images utilizing feeds. Suppose, the field accepts multiple images and you would like to import multiple images by using the importer, then you are able to use feeds tamper module for that. Look into the feeds tamper configuration to the images field:

 

You are able to alter the exploding character to anything, however be certain the character is unique and it is not present inside the URL of image. Right listed below is that the CSV importer for importing multiple images :
"SKU";"Title";"Description";"Brief Description";"Taxonomy Terms";"Product Selection";"Product Images"
"IMPORTED-PRODUCT-1";"Imported product display one";"This is an imported product one. This is an imported product one.";"This is an imported product one";"Clothing~Jackets";"IMPORTED-PRODUCT-1";"http://mysite.local/sites/default/files/compressed/image1.jpg~http://mysite.local/sites/default/files/compressed/image2.jpg"



Crystal Report 2013 Hosting France - HostForLIFE.eu :: How to Create Report on Crystal Reports without a Database ?

clock November 13, 2014 10:34 by author Peter

Sometimes we would like to do tricks with the Crystal Reports 2013 engine, like taking advantage of the exporting functions to make Word, Excel, or PDF files. What if we do not scan the data from a database? this article shows the details on making a Crystal Reports sub report, and the way to fill it from code, without a database.

Using the code

  1. First thing you should do is Create the Project: File -> New -> New Project
  2. Then, creat a new Crystal Reports Visual Basic Windows Application.
  3. Next, Create the DataSet schema. Right click the Crystal Reports project -> Add -> New Folder. Name it that folder: “DataSets”.
  4. Right click the “DataSets” folder , click Add then select New Item.
  5. Now, create the new CRDataSet DataSet. Right click the CRDataSet Designer Page, click Add, then select New element. I give it a name: MainTable.
  6. Add new Field1, Field2, Field3 rows.
  7. Repeat steps three and four, then Add a new DetailTable element.

You will have the following DataSet tables schema as shown as picture below:

Now,  we are going to Create report on Crystal Report:
1. First, Right click the Crystal Reports project -> Click “Add” -> SelectNew Folder.
2. Name it that folder “Reports”.
3.Right click on the Reports folder -> Click Add -> then select New Item.
4. Open a new MainReport Crystal Reports report.
5. Now, Click the Register Later button to close the register window, if it appears.
6. Select the Subreport and then click OK button. In the Contain Subeport Expert window Data tab, expand the Project Data -> Select ADO.NET DataSet -> CrystalReport.CRDataSet.
7. Choose MainTable. Now, Click the Insert Table button.
8. Click Next.
9. Next Step: Click the Add All button ->  Next -> Next -> Next.
10. Next to the Create a Subreport choice of the Subreport window tab, then fill  DetailReport in the Report Name edit box.
11. Click the Report Expert button. Insert the DetailTable. Then Click Next to open the Subreport Generator. Add All fields. Click Next. Click Next. Click Next. Click Next.
12. Type "No DB Subreport Crystal Report Sample" as the Subreport Title.
13. Click Finish.
14. After that Click Next. Type "No DB Crystal Report Sample." as the Main Report title. And now, click Finish.

And now we will add the a CrystalReportViewer1 to the form.

  1. Open the Form1 form. Click View -> Toolbox in the menu.
  2. Drag a CrystalReportViewer into the form.
  3. Right click the CrystalReportViewer1 CrystalReportViewer in the form -> Properties.
  4. Set the Dock property to Fill.
  5. Next step, Add the code to fill & show the Crystal Reports report. Then, Right click the Form -> View Code. Add the following Form1_Activated method:

Private Sub Form1_Activated(ByVal sender As Object, _
        ByVal e As System.EventArgs) _
        Handles MyBase.Activated
    Dim dsObj As CRDataSet = New CRDataSet
    FillDataSet(dsObj)
    Dim cr As MainReport = New MainReport
    ' Set the report DataSet  
   cr.SetDataSource(dsObj)
    CrystalReportViewer1.ReportSource = cr
End Sub


Now, I’m gonna Add the following FillDataSet code:

Public Sub FillDataSet(ByRef dataSet As CRDataSet)
    ' Turn off constraint checking before the dataset is filled.
    ' This allows the adapters to fill the dataset without concern
    ' for dependencies between the tables.
    dataSet.EnforceConstraints = False
    Try
        ' Attempt to fill the dataset MainTable
        dataSet.MainTable.AddMainTableRow("Hello!", _
                         "This is", "my sample data")
        ' Attempt to fill the dataset DetailTable
        dataSet.DetailTable.AddDetailTableRow("This is", _
                           "the detail", "information")
        dataSet.DetailTable.AddDetailTableRow("added", _
                           "without the", "need of")
        dataSet.DetailTable.AddDetailTableRow("actually", _
                           "access a", "database.")
    Catch ex As Exception
       ' Add your error handling code here.
        Throw ex
    Finally
        ' Turn constraint checking back on.
        dataSet.EnforceConstraints = True
    End Try
End Sub


Build and Run this Application. Hope this tutorial works for you!



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in