When I read report from .mrt file and compile it my parameters go well to report and everything goes smooth but when I read report from .dll I could not passs parameters to my reports. It looks that only not precompiled reports can be supplied with application parameters.
Is it true?
Regards
Parameters and compiled report
Parameters and compiled report
Hello,
Please show me code which you use for initialization parameters in second case.
Thank you.
Please show me code which you use for initialization parameters in second case.
Thank you.
Parameters and compiled report
I am using Clarion 6 for my application development and I create little COM wrapper to connect with StimulSoft.Reporter.Net, so the only difference is in starting lines in my original Clarion code everything is same and I have to mention that report is shown in both version but in first case it obeys the value of variables but in second it does not.
First case
Rpt{'LoadReport("Fakt.mrt")'}
Rpt{'CompileReport'}
Second case
Rpt{'GetFromAssembly("Fakt.dll")'}
Rest is same for both case
Rpt{'SetVariable("I_PGod",2008)'}
Rpt{'SetVariable("I_Sklad",1)'}
Rpt{'SetVariable("I_VrDok",3)'}
Rpt{'SetVariable("I_BrDok",551)'}
Rpt{'ShowReportInModalWindow'}
Below is C# code which I am using for COM wrapper
public void GetFromAssembly(string fileName)
{
Report = StiReport.GetReportFromAssembly(fileName);
}
public void ShowReportInModalWindow()
{
Report.Show(true);
}
public void LoadReport(string fileName)
{
Report.Load(fileName);
}
public void CompileReport()
{
Report.Compile();
}
Regards
First case
Rpt{'LoadReport("Fakt.mrt")'}
Rpt{'CompileReport'}
Second case
Rpt{'GetFromAssembly("Fakt.dll")'}
Rest is same for both case
Rpt{'SetVariable("I_PGod",2008)'}
Rpt{'SetVariable("I_Sklad",1)'}
Rpt{'SetVariable("I_VrDok",3)'}
Rpt{'SetVariable("I_BrDok",551)'}
Rpt{'ShowReportInModalWindow'}
Below is C# code which I am using for COM wrapper
public void GetFromAssembly(string fileName)
{
Report = StiReport.GetReportFromAssembly(fileName);
}
public void ShowReportInModalWindow()
{
Report.Show(true);
}
public void LoadReport(string fileName)
{
Report.Load(fileName);
}
public void CompileReport()
{
Report.Compile();
}
Regards
Parameters and compiled report
Hello,
Please use following code to fill report variable in compiled report (sorry c#):
Please use following code to fill report variable in compiled report (sorry c#):
Thank you.compiledReport["MyVariable"] = 123;
Parameters and compiled report
Your Clarion Code is calling the SetVariable method to set the properties. I don't see a SetVariable method in your COM wrapper.
maybe something like this.
I have done a lot of work with Stimulsoft in Clarion but have yet to work with any "Compiled Reports" and I do most of the C# side of the work with another programmer doing a majority of the Clarion Side so I may have interpretted your COM Syntax wrong. However, I believe that is what you need.
maybe something like this.
Code: Select all
public void SetVariable(string name, int value)
{
Report[name] = value;
}
Thanks,
John Hamilton
Hamilton & Company, LLC
John Hamilton
Hamilton & Company, LLC
Parameters and compiled report
Hello,
Your code is correct.
Thank you.
Your code is correct.
Thank you.