on 05-15-2015 11:12 AM
Hi together,
We are using Crystal Reports for VS2013 (CRforVS_13_0_13) in WinForms.
We have also an own UFL written in C# and .NET 4.
Everything works fine, but I have some scenario which I cannot solve yet.
In our application it is possible to preview multiply Crystal Previews in the same time.
The UFL is still in memory. But our UFL stores a lot of information for further functions, like tables, custom variables and so on.
What I need is, that each Preview/ReportDocument uses his own Instance of this UFL.
Before SP 10 we use Crystal Preview as a separate Process, so there was no problem. But because of speed issues we have decided to include all Crystal Logic in our main Application. Now Crystal is much faster but this a blocker for us.
I hope you understand what I mean and hope for a solution
Thank you very much in advance
Best regards
Steven Vissers
try importing the UFL into the application and initialize and destroy it within the application to see if that works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can I do that?
However, If you have 2 previews open in same time you can not destroy the UFL, because the same UFL is used by the other Viewer.
The Idea about threading is a good Idea, but the Report hanging in MTA mode (this mode not share the UFL....)
But even without a UFL, a blank report hangs in MTA mode. Please see my attachment above.
I believe that threading is the right way.
Hi Steven,
Unfortunately CR runtime only supports STA mode, always has done this since V5 when I started.
Add this to your app.config file also:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
What database driver are your reports using?
I'm curious, if you open 2 reports in CR Designer that use unique info for each do you get the correct data when Previewed?
Don
Hi Don,
yes and no....if I open the first report all data is fine. After I open the second report, this data is fine also, but if I go back the first report and refreh or change the page, data is not correct anymore, because the data is comming form report 2 (UFL Data).
I use standard SQL Provider. The UFL uses SQL Proder too.
Hi Don,
I think I will rewrite the UFL.
My idea is to give every Report a ID number. This ID I will generate from code and pass it to a Report field with a custom UFL Function to set the current ID in my UFL. This Field is in in the first pageheader (this page I will add also by code).
The UFL detect with ID is current and provide the data with is belong to the ID
I tried it and I am alomost finsih. I think this solution is better.
Thank you anyway for your help. Please close this topic.
Steven
Hi Steven
Only way I can think of each report using it's own version of the UFL would be to thread the app. See the following:
KBA 1403341 - How to export reports in multiple threads using the Crystal Reports .NET RAS SDK
KBA 1613561 - How to call a Windows form containing the CrystalReportViewer control on a separate thread
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.