RE: bind subreports during runtime



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;
}
}
}


.



Relevant Pages

  • RE: bind subreports during runtime
    ... Forthermore a lot of plugin-components are exsting. ... of a framework- report. ... I received an exception "Not supported within subreports" ... Eine existierende Framework-Komponente soll Report- Funktionalität anbieten ...
    (microsoft.public.vb.crystal)
  • bind subreports during runtime
    ... of a framework- report. ... Does somebody know a workaround, how to bind Subreports during runtime, or are there other ... Eine existierende Framework-Komponente soll Report- Funktionalität anbieten ... // Trial to link the Subreport to another pluginreport!!! ...
    (microsoft.public.vb.crystal)
  • RE: bind subreports during runtime
    ... Forthermore a lot of plugin-components are exsting. ... of a framework- report. ... I received an exception "Not supported within subreports" ... Eine existierende Framework-Komponente soll Report- Funktionalität anbieten ...
    (microsoft.public.vb.crystal)
  • Re: I need to do some totals of subreports
    ... I'll address your issues in the reverse order: ... To determine your totals, you'll need to restrict the data in the ... your record selection in your main report, ... The more subreports you have, the slower your report will be. ...
    (microsoft.public.vb.crystal)
  • RE: filtering works for subreports but not main report
    ... tweak to make Martin Green's form work for my calendar or another solution as ... each of its subreports) for each city; I just don't see any other way. ... run-time changes executed prior to each time the main report is opened. ... To change the SQL property of a saved query, you would need to do this prior ...
    (microsoft.public.access.reports)

Loading