gleznov
asked on
Losing data between CR 10 and VB.NET's Crystal Viewer (probably due to group)
Hi!
I have created a report using Crystal Reports 10 Professional. This report opens one table, takes the fields I need, and formats the report. I then use a CR control in VB.NET to open this report, and then combo boxes that allow our managers to select whatever criteria they want to view in the report. My problem with this particular one is that it's grouped by Employee, but some of the items in this inventory list don't have an Employee listed (null), which means they are unowned. I need to group by Employee however for the way the report needs to work.
Everything is fine in CR 10, but when I load this report in VB.NET, for some reason every row that has null for employee seems cut out. On the little box on the left that lists all employees, there's no blank one (like there is in CR 10), and when I query for any data using selectionformula=isnull({t able.Emplo yee}), there's no error, but no records are returned, which leads me to believe that somehow all that data is just being dumped out at report loadtime. I'd love to just find a fix for this problem, but I am working on an alternative solution:
I pulled a dataset from the database that the report references, selecting all records in which employee is null. I'm not having much luck when I try to redirect the reportsource to the dataset (and back again after the report is refreshed each time) and use that information, and I'm not even sure how datasets deal with things such as column headers, etc. So I'm kinda lost going at it this way too, and most likely it'd be easier to just find a fix to the dumped data problem than trying to switch between the report and a dataset depending on if the manager chooses "Unowned" vs. anything else on the employee-linked combo box.
Thanks!
JP
I have created a report using Crystal Reports 10 Professional. This report opens one table, takes the fields I need, and formats the report. I then use a CR control in VB.NET to open this report, and then combo boxes that allow our managers to select whatever criteria they want to view in the report. My problem with this particular one is that it's grouped by Employee, but some of the items in this inventory list don't have an Employee listed (null), which means they are unowned. I need to group by Employee however for the way the report needs to work.
Everything is fine in CR 10, but when I load this report in VB.NET, for some reason every row that has null for employee seems cut out. On the little box on the left that lists all employees, there's no blank one (like there is in CR 10), and when I query for any data using selectionformula=isnull({t
I pulled a dataset from the database that the report references, selecting all records in which employee is null. I'm not having much luck when I try to redirect the reportsource to the dataset (and back again after the report is refreshed each time) and use that information, and I'm not even sure how datasets deal with things such as column headers, etc. So I'm kinda lost going at it this way too, and most likely it'd be easier to just find a fix to the dumped data problem than trying to switch between the report and a dataset depending on if the manager chooses "Unowned" vs. anything else on the employee-linked combo box.
Thanks!
JP
I agree with Emre - sounds like you currently have an equal join which is excluding some records. Using the outer join should allow them.
frodoman
frodoman
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help
mlmcc
mlmcc
why dont you use right outer join between tbl 1 and tbl2. this way all the recordsfrom tabl2 and the matching records from tbl1 will show. Tbl 2 is the on with the null employees right then it should work
Regards
Emre