stored procedure mysql
Paulo Freire
S??o Paulo - Brasil
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.
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.