56 lines
2.1 KiB
C#
56 lines
2.1 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 ReportViewer : 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/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));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |