69 lines
2.7 KiB
C#
69 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Microsoft.Reporting.WebForms;
|
|
using System.Data;
|
|
using C2P_Data;
|
|
|
|
namespace C2P_Report
|
|
{
|
|
public partial class StdCostList : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
if (false)
|
|
{
|
|
ReportOffers.ProcessingMode = ProcessingMode.Remote;
|
|
ReportOffers.ServerReport.ReportServerUrl = new Uri(@"http://10.74.82.217/ReportServer_SQL2008R2");
|
|
ReportOffers.ServerReport.ReportPath = @"/Test/StdCostList";
|
|
ReportOffers.ServerReport.DisplayName = "StdCostList";
|
|
}
|
|
else
|
|
{
|
|
ReportOffers.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
|
|
LocalReport localReport = ReportOffers.LocalReport;
|
|
|
|
// 0) recupero la richiesta di stampa: numero ticket! e lingua!
|
|
string lingua = "EN";
|
|
int dataRif = 0;
|
|
//string chiave = "";
|
|
try
|
|
{
|
|
if (Request.QueryString["DataRif"] != null)
|
|
{
|
|
dataRif = Convert.ToInt32(Request.QueryString["DataRif"]);
|
|
}
|
|
}
|
|
catch
|
|
{ }
|
|
try
|
|
{
|
|
lingua = Request.QueryString["lingua"];
|
|
}
|
|
catch
|
|
{
|
|
lingua = "EN";
|
|
}
|
|
if (lingua == "" || lingua == null) lingua = "EN";
|
|
|
|
// 1) impostazione file report
|
|
localReport.ReportPath = @".\Reports\StdCostList.rdlc";
|
|
|
|
// 2) caricamento tab dati
|
|
DataTable tabVoc = new DataTable();
|
|
DataTable tabStdCostList = new DataTable();
|
|
tabVoc = (DataTable)SteamWare.selDataVoc.mgr.getVocabolarioByLemma(lingua, "C2P_prtCL"); // HARD CODED lemma x report!!!
|
|
tabStdCostList = (DataTable)DtProxy.man.taSCL.getByDate(dataRif);
|
|
// 3) inserimento dataset nel report
|
|
localReport.DataSources.Add(new ReportDataSource("dsVocabolario", tabVoc));
|
|
localReport.DataSources.Add(new ReportDataSource("dsStdCostList", tabStdCostList));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |