stored procedure mysql

Paulo FreirePaulo Freire S??o Paulo - Brasil
edited November 2012 in FastReport .NET
I'm having trouble generating the report fast report with stored procedure mysql

Or even with sql select mysql.



are the first pictures of the process of stored procedures, help04.jpg, help5.jpg and help6.jpg

My Button load report

protected void btnGeraRelatorio_Click(object sender, EventArgs e)
{
GeraPDFCoordenadoria();
}

private void GeraPDFCoordenadoria()
{
FastReport.Utils.RegisteredObjects.AddConnection(typeof(MySqlDataConnection));


// No temp files
FastReport.Utils.Config.WebMode = true;

// Set PDF export props
FastReport.Export.Pdf.PDFExport pdfExport = new FastReport.Export.Pdf.PDFExport();
pdfExport.ShowProgress = false;
pdfExport.Subject = "Subject";
pdfExport.Title = "CAFEBI";
pdfExport.Compressed = true;
pdfExport.AllowPrint = true;
pdfExport.EmbeddingFonts = true;

// Load our report
FastReport.Report report = new FastReport.Report();

FastReport.EnvironmentSettings evn = new FastReport.EnvironmentSettings();
//evn.DatabaseLogin += new FastReport.DatabaseLoginEventHandler(evn_DatabaseLogin);

//report.Load(Request.PhysicalApplicationPath + "Templates\\Invoice\\"+Request.QueryString["report"]+".frx");
report.Load(Request.PhysicalApplicationPath + "RelatorioCoordenadoria.frx");
report.SetParameterValue("idgrupo3", Convert.ToInt16(dpCoordenadoria.SelectedValue));

report.Prepare();

// Export report to PDF stream
MemoryStream strm = new MemoryStream();
report.Export(pdfExport, strm);
report.Dispose();
pdfExport.Dispose();

// Stream the PDF back to the client as an attachment
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "Application/PDF";
Response.AddHeader("Content-Disposition", "attachment;filename=RelatorioPorCoordenadoria.pdf");

strm.Position = 0;
strm.WriteTo(Response.OutputStream);
strm.Dispose();

Response.End();
}




the report by the select works and generates pdf, but with all the data is not respecting the parameter.

The report by stored procedure does not work, shows error.

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.