Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi After days of searching the web without success, I just explain my problem to get help. Thank you in advance.
I use VB 2008 + ACCESS 2007 with Crystal Reports for VS 2008, Windows 7.
Here is my problem: I am writing an application that manages the accounting ratios.
When I write a formula in the editor, CR does not report me any error (no error was found). But at runtime, I get the error "This field name is unknown"
The formula, written with Crystal syntax
C#
if then {View_Etab_ParRatio.Seuil_Min}=0 then
   cstr ({View_Etab_ParRatio.Janvier}, 0)
else
   cstr ({View_Etab_ParRatio.Janvier}, 2)

curiously, when I simplify the formula by writing eg cstr({View_Etab_ParRatio.Janvier, 0), I do not get an error neither in the editor, nor at running time. Everything goes well.
I note that I call my report a datatable (MyPrintDatatable), which I create with a request
Here the lines of the report display
VB
Dim MyCustomReport As SISCEC.rptView_Etab_ParRatio
MyCustomReport = New SISCEC. rptView_Etab_ParRatio
MyCustomReport.SetDataSource (MyPrintDatatable) 'load the source of the report
'Report display
frmPrint.crViewerDoc.ReportSource = MyCustomReport
frmPrint.ShowDialog ()

NB: The state was created in the design with the name query View_Etab_ParRatio

Thank you for your help
Posted
Updated 24-May-15 12:03pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900