Files
C2P/C2P/RepOffers.aspx.cs
T
Samuele E. Locatelli 6ad3db8312 Fix inserimento lingua x report embeddati da quella utente
Sistemata scheda costi con label calcolate da tipo di valori (item/gruppo, incoterms...)
2014-05-12 11:59:53 +02:00

61 lines
2.4 KiB
C#

//using C2P_Data;
//using Microsoft.Reporting.WebForms;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace C2P
{
public partial class RepOffers : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// imposto iframe!
repView.Src = string.Format(@"{0}/ReportViewer.aspx?ticket={1}&lingua={2}", memLayer.ML.confReadString("reportsUrl"), Request.QueryString["ticket"], user_std.UtSn.lingua);
#if false
if (memLayer.ML.confReadBool("ReportRemoteRender"))
{
ReportOffers.ProcessingMode = ProcessingMode.Remote;
ReportOffers.ServerReport.ReportServerUrl = new Uri(@"http://10.74.82.217/ReportServer_SQL2008R2");
ReportOffers.ServerReport.ReportPath = @"/Test/ReportOffers";
ReportOffers.ServerReport.DisplayName = "Offers";
}
else
{
ReportOffers.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
LocalReport localReport = ReportOffers.LocalReport;
// 0) recupero la richiesta di stampa: numero ticket!
int ticket = 0;
try
{
ticket = Convert.ToInt32(Request.QueryString["ticket"]);
}
catch
{ }
// 1) impostazione file report
localReport.ReportPath = @".\Reports\ReportOffers.rdlc";
// 2) caricamento tab dati
DataTable tabVoc = new DataTable();
DataTable tabQuote = new DataTable();
tabVoc = (DataTable)SteamWare.selDataVoc.mgr.getVocabolarioByLemma(SteamWare.user_std.UtSn.lingua, "C2P_prt1"); // HARD CODED lemma x report!!!
tabQuote = (DataTable)DtProxy.man.taQFQ.repOffersByTicket(ticket);
// 3) inserimento dataset nel report
localReport.DataSources.Add(new ReportDataSource("dsVocabolario", tabVoc));
localReport.DataSources.Add(new ReportDataSource("dsQuoteFull_Q_Data", tabQuote));
}
#endif
}
}
}
}