Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
Crystal Reports e reportistica
URGENTE: la creazione del pdf non si aggiorna più
mercoledì 08 giugno 2005 - 08.49
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
stee85
Profilo
| Senior Member
299
messaggi | Data Invio:
mer 8 giu 2005 - 08:49
Ciao a tutti
qualcuno sa perchè dopo aver creato il mio report ed esportato in pdf per un po' funziona e poi improvvisamente non lo aggiorna più ... anche se provo ad aggiungere una semplicissima casella di testo
grazie
Ste
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
mer 8 giu 2005 - 15:25
ciao,
scusami ma non ho capito bene, dovresti essere piu dettagliata:
fai l'eportazione da pulsante o da codice?
sei in asp.net?
se si: se modifichi il report poi ovviamente lo copi sopra e richiami la pag è ancora uguale?
potrebbe essere 1problema di cache...
stee85
Profilo
| Senior Member
299
messaggi | Data Invio:
mer 8 giu 2005 - 15:42
ok mi spiego meglio...
si sto lavorando sempre con asp.net e ho creato il mio report con crystal.
Da codice gli dico di aprirmi direttamente il pdf senza farmi vedere il file di crystal.
Ha sempre funzionato, faccio delle modifiche rilancio il progetto e il pdf si aggiorna ora invece non si aggiorna più.
Ho provato a spegnere tutto e a riavvare ma niente non è cambiato nulla
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
mer 8 giu 2005 - 17:03
ciao,
quello che potrebbe essere è che tu da codice utilizzi la classe report e non il file ovvero nel tuo codice fai cosi:
reportdocument rpt = new reportdocument();
rpt .load(....
viewer.reportsource = rpt;
viewer.datebind();
e gli passi il percorso del file o passi direttamente l'oggetto?
perche nel caso tu non faccia il load del file il report viene compilato insieme all'applicazione e quindi se non si riavvia l'applicazione rimane sempre quello...
event prova a riavviare iis dopo la modifica del report e vedi, se te lo carica/esporta giusto allora il problema è quello....
ciao
stee85
Profilo
| Senior Member
299
messaggi | Data Invio:
mer 8 giu 2005 - 17:15
Ho provato a riavviare le iis ma niente. Il bello è che per dei giorni ha funzionato perfettamente poi improvvisamente non funzina più
questo è quello che faccio:
string pag=Request["more"];
//Instanziamo la classe e creiamo un nuovo oggetto
TableLogOnInfo credentials=new TableLogOnInfo();
//Completiamo le proprietà con i nostri parametri per l'accesso a SQL
credentials.ConnectionInfo.DatabaseName="SISCO_TEST";
credentials.ConnectionInfo.UserID="sa";
credentials.ConnectionInfo.Password="";
credentials.ConnectionInfo.ServerName="10.168.2.3";
credentials.TableName="report";
//Aggiungiamo le credenziali al Report Viewer
CrystalReportViewer1.LogOnInfo.Add(credentials);
//Indichiamo al Report Viewer di caricare il Report creato (Report.rpt)
CrystalReportViewer1.ReportSource=Server.MapPath(pag + ".rpt");
int act=Convert.ToInt32(Request["act"].ToString());
crRec17 crReportDocument = new crRec17();
crReportDocument.RecordSelectionFormula="{Act.ActOwnId} = "+act;
try
{
//layout della pagina - formato A4 e orientamento
crReportDocument.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
crReportDocument.PrintOptions.PaperSize =CrystalDecisions.Shared.PaperSize.PaperA4;
//qui dico in che formato deve essere il file
crReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
crReportDocument.ExportOptions.ExportDestinationType =CrystalDecisions.Shared.ExportDestinationType.DiskFile;
crReportDocument.ExportOptions.ExportFormatType =CrystalDecisions.Shared.ExportFormatType.PortableDocFormat ;
//salvo il file con il nome del report
string filename=pag+".pdf";
string path=Request.PhysicalApplicationPath + @"Reports\"+filename;
DiskOpts.DiskFileName =path;
crReportDocument.ExportOptions.DestinationOptions = DiskOpts;
crReportDocument.Export();
crReportDocument.Close();
//Apro il file creato
Response.Redirect("~/Reports/"+filename);
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
mer 8 giu 2005 - 17:28
prova a cambiare il modo come ti dicevo io, tu usi:
.....new crRec17().....
quindi direttamente l'oggetto, prova con:
....
reportdocumentcrReportDocument = new reportdocument();
crReportDocument.load (server.mappth("...."))
....
il resto uguale in teoria...
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !