deliver report on website

Hi all ,
I'm using Fastreport Studio in Asp.Net v2 Web-Application project . I have Created a simple report and i want to deliver this on my website .
but after creating and passing custom dataset , every thing is ok in Fast-Report Designer BUT after pressing Preview Button nothing will be appeared.
//select code of fr3 file from data base
SqlConnection con = new SqlConnection(ConStr);
SqlCommand com = new SqlCommand("Select * From My Table", con);
con.Open();
string tt = com.ExecuteScalar().ToString();
//*************************************
// Create report object
frx = new TfrxReportClass();
//*************************************
frx.EngineOptions.SilentMode = frxSilentMode.simSilent;
//**************************************
// Create ADO database object
TfrxADODatabaseClass ado_database = new TfrxADODatabaseClass();
ado_database.ConnectionString ="connection string";
ado_database.LoginPrompt = false;
ado_database.Connected = true;
//**************************************
// Create ADO query object
TfrxADOQueryClass ado_query = new TfrxADOQueryClass();
ado_query.DataBase = ado_database;
ado_query.Name = "db_Qrf533";
ado_query.Query = str_query
//****************************************
frx.SelectDataset(true, ado_query as IfrxDataSet);
MemoryStream m = new MemoryStream(System.Text.Encoding.Default.GetBytes(tt));
frx.LoadReportFromStream(m);
//***************************************
// Disable progress window
frx.ShowProgress = false;
//*****************************************
// For testing I added this line
frx.DesignReport(); // After Executing this line, every thing is ok and design page of Fast-Report Will be
shown successfully, even My above Dataset with its Fields and its data are displayed in [Data]
Page of the Fast-Report BUT When i Press the [PreView] Button , nothing appears !!!!

// Create a memory stream object
ms = new System.IO.MemoryStream();
// Query extended export interface
exports = frx as IfrxBuiltinExportsEx;
// Do export
exports.ExportToHTML(ms, true, true, false, true, true, false);
// Set memory stream position to begin
ms.Position = 0;
// Create tream reader by a memory stream
sr = new System.IO.StreamReader(ms);
// Write result to the user's browser
string TmpStr = sr.ReadToEnd();

Response.Write(TmpStr);
sr = null;
ms = null;
frx.ClearDatasets();

//
What am i doing wrong here? Could anyone help me please?
Kind Regards.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.