Last post Mar 14, 2011 02:00 PM by vineetrok
Mar 14, 2011 02:58 AM|vineetrok|LINK
I have included 5 tables in my crystal reports as follows
I have added the first four fields in patientdetails table in the header of report, which is displayed properely.
when I add the fields from bloodinfo table I can view only the fields of the 1 st patient, that too 4 times.
almost every patient has the data under bloodinfo but I can view only of one.
How do I display the fields properly????
Mar 14, 2011 04:06 AM|cyberbud|LINK
The problem can be easily identified if you create a sql query that replicates the relationship between the tables.
You need to change your strategy lil bit by using sub-reports instead
Let me try to explain you step by step.
I hope you got my point.
If you are unaware of the sub-reports then plz refer to the links below.
If you need more tutorials then u can search it in any search engine.
Mar 14, 2011 07:21 AM|vineetrok|LINK
This is the format
This is the unexpected output. It is supposed to display only the red circled part. but it is displaying all records in the bloodinfo table.
there are 12 entries in patientdetails table but only 4 havre data under bloodinfo, I want to do same for remaining 3 tests also.
This is the SQL Query
SELECT "bloodinfo"."Pid", "bloodinfo"."BGroup", "bloodinfo"."RHfactor", "patientdetails"."Pname", "patientdetails"."Page", "patientdetails"."Psex", "patientdetails"."Referredby"
FROM "NewPro_db"."dbo"."bloodinfo" "bloodinfo" INNER JOIN "NewPro_db"."dbo"."patientdetails" "patientdetails" ON "bloodinfo"."Pid"="patientdetails"."Pid"
Mar 14, 2011 08:31 AM|cyberbud|LINK
Ya I got that.
The solution is to use subreports for each child records .
Mar 14, 2011 11:59 AM|vineetrok|LINK
Ok, I did it using subreports..But now, I'm getting same record 4 times ie. in bloodinfo subreport.
anyways How do I implement this report in my vb.net web page?
I'm using a CrystalReportviewer in a .aspx page. but how do I display a info about a particular patient????
I mean using a user input, or selecting from gridview etc.
Mar 14, 2011 12:26 PM|cyberbud|LINK
That may be coz your sub-report and main report are not linked. Refer to the links I posted earlier.
After that you need to provide the selectionformula for the report object.
Then supply logon parameters in your report viewer.
I googled and found this one suitable for you.
However get some crystal report online tutorials and walk through
Mar 14, 2011 02:00 PM|vineetrok|LINK
I did link my sub report to main report. ie. pid of subreport(bloodinfo) to that of the pid of mainreport(patientdetails).
Thanks a lot. Will try to do it using push method.
thanks a a lot.