Moneymaking niche websites with multiple streams of income with AdSense, Amazon, Click Bank, Commission Junction

Guideline to Store Report Templates

Affiliate, Website, Turnkey, Money Making

Affiliate, Website, Turnkey, Money Making
Money making Affiliate sites is online opportunities to Make Money for extra home income through Hotels & Travel affiliate, amazon affiliate products, Google AdSense, click bank product, commission junction, linkshare, share a sale and many other affiliate marketing established turnkey money making sites to sell through our site and have integrated popular products with affiliate links Turnkey moneymaking affiliate site is one of the most money generating business through online As required and if interested we also set up more affiliate links to our established moneymaking websites Our entire turnkey money making website has reasonable price with great feature Our most popular High paying affiliate programs and fast selling website as follow

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingHotel & Flights affiliate website

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingClick bank websites for sale

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingTravel & Trip affiliate website

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingAmazon affiliate Websites

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingSEO Products & Service Websites

Icon flash-40x40 - Copy - Affiliate, Website, Turnkey, Money MakingTurnkey Affiliate websites with Revenue

Storing of report templates in a database is requested by some applications.  Since all reports are held in the same place, this process simplifies template support and permits to distinguish the access rights to various templates. However, there is one drawback of this technique that should not be ignored – the code in the customer application is fairly complex.

Affiliate, Website, Turnkey, Money Making


Affiliate, Website, Turnkey, Money Making

For example, we need to create Access database (mdb) named “reports” and a table for storing our report templates. I named this table “reports_table”. Three tables are enough in our data table:
– Field name Type Description
1 Id counter Auto-increment, index
2 ReportName text Name of report
3 ReportFile BLOB Binary data with template

Affiliate, Website, Turnkey, Money Making


Affiliate, Website, Turnkey, Money Making

You can store templates in any other database similar to the one in our example.

Affiliate, Website, Turnkey, Money Making

To do this:

Affiliate, Website, Turnkey, Money Making

open the designer;
show custom form with a list of templates from our database instead of standard dialog when users open a file in the designer;
load template in the designer after selecting it in the custom form;
Save the template in a database where the user saves a file in the designer.

Affiliate, Website, Turnkey, Money Making

Despite the apparent complexity, the tasks above will be simple because FastReport.NET has special features.

Create a new project in Visual Studio first. Then you need to drag-n-drop “Report” object from toolbox to the empty form. Also drag the ” EnvironmentSettings” object (properties of reporting engine).


You can setup many settings of the report and the designer in “environmentSettings1” object. You have to override the event handlers CustomOpenDialog, CustomOpenReport, CustomSaveDialog and CustomSaveReport.


Event handler CustomOpenDialog allows releasing any algorithm of the load report template in the designer – load template from the database field and load it in the designer or set e.Cancel = true; when loading fails.


The problem reduces to showing a dialogue with a list of files from which you want to select the report template from the database and load the template in the designer. Of course, if the user presses the Cancel button in this dialog, we set e.Cancel = true. The loading process is clear but saving code need some details.


The user can choose two ways to save a file – simply by clicking “Save”, in this case report should be rewritten to the old place, or the second option – “Save as…”, the user is expected to select path of file. Storage location of report templates cannot be changed in our case. You need to save template in the old place (database field) in both ways – capture the CustomSaveDialog event by empty function and save template in database in the CustomSaveReport event.


Now you need to add a new data source to the project – reports.mdb.Drop the button on form for launching of the reports designer.


Write in the Click event handler:
private void button1_Click(object sender, EventArgs e)

Create an additional dialog form for template selection:


Assign the buttons OK and Cancel corresponding to DialogResult.
Do not forget to bind your data source to DataGrid – select the field name of the record and make the index field invisible.

You need to save the selected index when you click on the ‘OK’ button:
public int reportID;

private void OKBtn_Click(object sender, EventArgs e)
// save id of report for use in future
reportID = (int)dataGridView1.CurrentRow.Cells[0].Value;

We return to our first form. It is time to handle the events of opening and saving a report. We make loading the first thing to do:
// define variable for store of report ID
private int reportID;
// define array byte[] for store of template
private byte[] blob;

private void environmentSettings1_CustomOpenDialog(object sender,
FastReport.Design.OpenSaveDialogEventArgs e)
using (ReportListForm reportListForm = new ReportListForm())
// show dialog for report selection
if (reportListForm.ShowDialog() == DialogResult.OK)
// get report ID
reportID = reportListForm.reportID;
// load report in array from BLOB
blob =
// read file name of report for designers title
e.FileName =
// cancel loading
e.Cancel = true;

Second handler CustomOpenReport for loading the template in designer should look like this:
private void environmentSettings1_CustomOpenReport(object sender,
FastReport.Design.OpenSaveReportEventArgs e)
using (MemoryStream stream = new MemoryStream())
// skip all garbage created by MS Access in begin of blob field – we seek the tag of XML
int start = 0;
for (int i = 0; i)

Perfecting Report generation

Related terms: Turnkey Affiliate Programs with Websites, Money Making Affiliate Websites, Turnkey Websites That Make Money, Making Money Affiliate Marketing, Money Making Affiliate Program, Clickbank Turnkey Websites, Turnkey Websites Ready Made Website, Affiliate Websites for Sale

VISIT Site for More Info A