Last post Dec 16, 2013 07:35 AM by abhijithmanipal
Dec 12, 2013 09:09 AM|abhijithmanipal|LINK
First time i am working on Crystal Report. Actually I am trying to access the Crystal Report parameters from my application and I am getting the above error.
My Crystal Report structure is like this -
Main Report Parameter - ClientVersionID
Have Multiple Sub Reports. One is having ClientVersionID as Parameter and another having VersionID as Parameter. Both are Linked Parameters.
So while accessing the Report, i am passing a single paramter value to the Main Report i.e, ClientVersionID and i am not passing anything for Sub Reports.
Can you guys please help me out in this..
Dec 12, 2013 11:58 PM|Ajay2707|LINK
If you link both parameter , then main report also have this parameter too. If no then , create one and map that to sub-report.
please set your versionid parameter in selection formula or set default value by right click of parameter, open parameter popup and define default value.
pass the value from your .net code as you passing other.
If you unable to understand, then just open report ,f5, it ask both parameter and give only one parmeter value which through the same error.
So basically logic is eigher you set parameter default value or you must pass the value from code.
Dec 13, 2013 12:50 AM|abhijithmanipal|LINK
Thanks for your reply.
I dont want to set the default value. Since its a linking paramter still i need to pass the value ?
I observed that parameter names are different but its linking parameters (in my example its ClientVersionID and VersionID).
I tried to run the Main Report by pressign F5 its asking for only ClientVersionID. So i am getting confused here.
Dec 13, 2013 02:25 AM|Ajay2707|LINK
if you f5 and report ask only one parameter , then ideally it will not get error from code too.
There is some issue will getting this error.
1. check that you are not save report as "save with data".
2. check in design mode and runtime mode the proper or same database access with proper credential. (some time we design the data from one database and at runtime we assign the other db which may differ/modify sp.
3. differ datatype of parameter value at design time/runtime.
if still you have issue, then good to pass subreport parameter from your code too (http://p2p.wrox.com/crystal-reports/63379-how-pass-parameter-sub-report-asp-net-2-0-a.html)
Dec 13, 2013 05:33 AM|abhijithmanipal|LINK
Where do i have the option "Save With Data" and whats the significance of it ?
Dec 14, 2013 12:03 AM|Ajay2707|LINK
that you can find in file -> "save report with data" (http://keptin.net/crystaldecisions/crystalreports/savedatawithreport/)
for impact check this link: http://scn.sap.com/thread/2106158
This option if checked, then if you refresh , still you get the old data.
Dec 16, 2013 12:44 AM|abhijithmanipal|LINK
I am able to generate the report without any errors in VB application what i had previously. Same .rpt file i am using it for .Net also.
So i am getting same error here in .Net ...
Dec 16, 2013 01:25 AM|abhijithmanipal|LINK
My Main Report Parameter is - ?@ClientVersionID
But in Sub Reports its - AUMObj.ClientVersionID (AUMObj is a Table) which is linked with Main Report.
So AUMObj.ClientVersionID will be treated as a new parameter ??
Dec 16, 2013 04:59 AM|Ajay2707|LINK
No , ?@ClientVersionID parameter of main report is treated as new parameter. I explain flow
1. Crystal report first execute main report
2. it take first parameter value from .net or manual-input(at design time-f5.
3. Then it execute sp or tables to fetch data, after fetching data.
5. It filter data as per report selection-formula.
6. Then it set data as per design from header to footer.
7. If groping is there , then loop and set data, untill data comes.
8. at last group footer , header footer, report footer set.
9. If we use cross-tab, then it set loop in that particular section.
10. if we use sub-report, then it first check linked parameter and pass the value at runtime, then same execute as above step.
So if any stage , specially for parameter, then it always needed at first before start any thing.
So ?@ClientVersionID parameter set either in selection formula or from .net code.
Dec 16, 2013 07:35 AM|abhijithmanipal|LINK
Thank you very much Ajay. You made my day .... :-)