RE: bind subreports during runtime
- From: Serena <Serena@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Oct 2008 06:34:00 -0700
Hi Lukas,
I read todat your message, I have the same problem Go you have the solution?
If Yes Can you post it?
Thank you
Serena
"Lukas" wrote:
Hello,.
I would like to do following:
A Framework-Component has to provide report- functionality
(Header, Logo / Footer, Username , Date time, Page n of y) and so on
[CrystalApp.exe]
Forthermore a lot of plugin-components are exsting.
All of them have different reporting data,
but should use the same generic functionality from the framework, and only
adding their specific data in the middle Details Section
of a framework- report.
[CrystalPlugin.dll]
I had following Idea:
Created in the Framework-component a CrystalApp.rpt (with header and footer)
In the middle Details Section, who should be plugin-specific, I placed a
SubReport.
Just for testing i directly entered the path of one of a
pluginReport(CrystalPLugin.rpt).
It worked !.... but unfortunately just in a statical way!
After that, i tried to change a SubReport-rpt during runtime.
I received an exception "Not supported within subreports"
look below in the code example +++
I should be able to change the link to another specific Subreport during
runtime.
Does somebody know a workaround, how to bind Subreports during runtime, or
are there other
possibilities?
Thanks in advance!
Lukas
+++ Heres some example code:
namespace CrystalApp
{
public partial class Form1 : Form
{
CrystalAppReport report = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.InitializeCrystalReports();
}
void InitializeCrystalReports()
{
report = new CrystalAppReport();
// !!! Trial to link the Subreport to another pluginreport !!!
throws Exception "Not supported within subreports." !!!
report.Subreports[0].Load(@"C:\checkout\Test\Crystal_Demo\CrystalPlugin\CrystalPluginReport.rpt");
crystalReportViewer1.ReportSource = report;
}
}
}
//**************************************************************************************
// german version
//**************************************************************************************
Hallo,
Ich möchte folgendes bewerkstelligen:
Eine existierende Framework-Komponente soll Report- Funktionalität anbieten
(Kopfzeile, Logo / Fusszeile User,Datum Zeit, Seite x von y ) usw.
[CrystalApp.exe]
Des weiteren existieren viele Pluginkomponenten ,welche alle
unterschiedliche Reportingdaten haben, aber welche sich der generischen
Funktionalität der Framework-Komponente bedienen sollen und nur die
pluginspezifischen Daten in einem Report definieren sollen.
[CrystalPlugin.dll]
Ich hatte folgende Idee:
In der Framework-Komponente ein CrystalApp.rpt erzeugt, Header und Footer
Daten darin erzeugt.
Im mittleren Teil, welcher Pluginspezifisch sein soll, einen SubReport
eingefügt.
Und versuchsweise direkt den Pfad des PluginKomponentenReports
angegeben(CrystalPlugin.rpt). Es funktioniert! ... aber leider nur statisch!
Ich habe danach versucht dies während der Laufzeit zu bewerkstelligen.
Ich erhielt leider eine exception "Not supported within subreports"
Ich möchte aber zur Laufzeit die Verlinkung des Subreport-Bereiches(des
Framework-Reports) auf einen Report eines anderen Plugins ändern können.
Kennt jemand einen Workaround, wie man zur Laufzeit andere Subreports binden
kann. Oder gibt es eine andere Möglichkeit?
Gruss Lukas
Hier der Beispiel-Code:
namespace CrystalApp
{
public partial class Form1 : Form
{
CrystalAppReport report = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.InitializeCrystalReports();
}
void InitializeCrystalReports()
{
report = new CrystalAppReport();
// Trial to link the Subreport to another pluginreport !!!
throws Exception "Not supported within subreports." !!!
report.Subreports[0].Load(@"C:\checkout\Test\Crystal_Demo\CrystalPlugin\CrystalPluginReport.rpt");
crystalReportViewer1.ReportSource = report;
}
}
}
- Prev by Date: RE: bind subreports during runtime
- Next by Date: Surpressing headers
- Previous by thread: RE: bind subreports during runtime
- Next by thread: Surpressing headers
- Index(es):
Relevant Pages
|
Loading