two disimilar tables - Report

  • Thread starter Thread starter jjmraz
  • Start date Start date
J

jjmraz

Hi All,

I have two dissimilar tables, what I mean by this is there is no data
in either table that has anything to do with the other from a
relationship standpoint. Now my problem is I need to create a report
that shows the records from both tables. First tables data then right
after the second tables data. So is it possible to make two separate
SELECT calls to the database and store them in one dataset? If I was
using a typed dataset can I do this as well? What would I need to do to
set this up?

Thanks,

JJ
 
Maybe this idea will help...it seems to be a lot of extra stuff but...

select *, 0.0 as Bfield1, '' as Bfield2, ...etc from tableA
union all
select 0.0 as Afield1, '' as Afield2,...,* from tableB
 
Even with out bringing the unions into this (sorry, I could not resist) you
can create a report from any number of DataTable instances. The RDL(c)
report definition is fully capable of doing precisely this--with very little
code. It's supported in SQL Server Express (Advanced Services) Edition (for
free) and in Visual Studio 2005 (Pro).

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Even with out bringing the unions into this (sorry, I could not resist)
;o)

you
can create a report from any number of DataTable instances. The RDL(c)
report definition is fully capable of doing precisely this--with very little
code. It's supported in SQL Server Express (Advanced Services) Edition (for
free) and in Visual Studio 2005 (Pro).

hth

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Bill,

I am using VS2003/ access database/Crystal Reports for an asp.net
application.
Can your suggestion be done with VS2003? If not how can I do this with
a sub report
in crystal reports? Or I was thinking of making two calls to the
database and populate two tables in
a dataset. Then pass that to Crystal. Or is there an easier way?

Thanks,
JJ
 
Bill,

I noticed that my hosting company supports asp.net 2.0 now. With that
said
can I use RDLC to generate my reports without using Crystal? I can just
upgrade my app
to VS2005 which I have.

JJ
 
Yes, the ReportViewer control can be used (very easily) to do this--even
with ASP with no dark crystals in sight.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top