Home All Groups Group Topic Archive Search About

two disimilar tables - Report

Author
22 Apr 2006 12:48 PM
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

Author
22 Apr 2006 2:40 PM
Brad Roberts
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
--
Brad

"Software is like melted pudding..."


Show quote
"jjm***@hotmail.com" wrote:

> 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
>
>
Author
22 Apr 2006 4:46 PM
William (Bill) Vaughn
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.
__________________________________

<jjm***@hotmail.com> wrote in message
Show quote
news:1145710127.952085.164220@i39g2000cwa.googlegroups.com...
> 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
>
Author
22 Apr 2006 4:55 PM
Otis Mukinfus
On Sat, 22 Apr 2006 09:46:38 -0700, "William \(Bill\) Vaughn"
<billvaRemoveT***@nwlink.com> wrote:

>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
Author
23 Apr 2006 2:36 AM
jjmraz
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
Author
23 Apr 2006 2:56 AM
jjmraz
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
Author
23 Apr 2006 4:16 AM
William (Bill) Vaughn
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.
__________________________________

<jjm***@hotmail.com> wrote in message
Show quote
news:1145761003.638372.306890@g10g2000cwb.googlegroups.com...
> 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
>

AddThis Social Bookmark Button