logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
DaveLegg  
#1 Posted : Friday, March 29, 2019 7:02:01 PM(UTC)
DaveLegg

Rank: Newbie

Groups: Registered
Joined: 3/29/2019(UTC)
Posts: 0
United States
Location: California

HI. I just installed Seal Report to explore it's capability. The demo is very nice and it seems like a good start.
I have been able to create a data sources and access both oracle and sql server data bases, so I have a basic understanding of how it is working.

One of my needs is to combine information from multiple sources into a single report.
For instance, I have two distinct SQL Server databases and I need to combine data from both into a single display item in a report.

So far I have been unable to do this. What I found in the forum also suggests this is not supported, but the messages are fairly old.

Is this still true? any single report is restricted to a single source?

Thanks.

epf  
#2 Posted : Monday, April 1, 2019 10:35:58 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
You can display different data sources in a report.
A report can contain Data Source 1 and Data Source 2
Then you can create Model 1 on Data Source 1 and Model 2 on Data Source 2
Then a View 1 displaying Model 1 and View 2 with Model 2


You just change the 'Source' property in 'Model Definition' when you edit your model.

And in the view of type Model, just change the 'Model' property.

Good luck.
DaveLegg  
#3 Posted : Monday, April 1, 2019 10:41:00 PM(UTC)
DaveLegg

Rank: Newbie

Groups: Registered
Joined: 3/29/2019(UTC)
Posts: 0
United States
Location: California

Thanks for the info, but I think my wording was not specific enough, my bad.

I was able to do what you suggested: have two source, two models and see data from both in one view as two separate items.

What I want to do is combine the data from two sources to produce a new value for display in the report.

Here's what I am trying to do.

Source A has planned events with the projected results.

Source B has the current event status and up to the minute results.

I would like to display the current results (in Source B) as a percent of the projected results (from Source A).

Is this sort of thing possible in Seal Reports?

Thanks.



epf  
#4 Posted : Tuesday, April 2, 2019 6:15:54 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
There are several ways to handle this:
- if you can, create a linked server to Oracle and query directly the SQL Server which will handle the joins and data got from Oracle
- use Seal Report Scripts: if you know C# and the SR Object model, it is quite easy to use the value got from one model to modify the table result generated for another model.
take a look at the sample 54-Final Script which shows how to modify the result table (Property 'Final Script' of the model).
You may use also the 'Cell Script' property of an element of your model to modify it.

Good luck.



DaveLegg  
#5 Posted : Tuesday, April 2, 2019 2:11:04 PM(UTC)
DaveLegg

Rank: Newbie

Groups: Registered
Joined: 3/29/2019(UTC)
Posts: 0
United States
Location: California

Ok, thanks. I'll look into that sample.
mcaronis  
#6 Posted : Friday, April 5, 2019 7:04:38 PM(UTC)
mcaronis

Rank: Newbie

Groups: Registered
Joined: 4/5/2019(UTC)
Posts: 0
Brazil
Location: sp

I'm new to Seal. I'ld like to now if there is anyone that can help me to connect a dBase data source or to create a Catalog for dBase files.

Thank you
MaSch01  
#7 Posted : Thursday, August 3, 2023 10:08:40 PM(UTC)
MaSch01

Rank: Newbie

Groups: Registered
Joined: 8/3/2023(UTC)
Posts: 0
United States
Location: South

I followed @epf above
Quote:
There are several ways to handle this:
.
Yes, there are several ways my friend...

First I believed only way was Scripting (it's not) if I couldn't create a Link Server:
Created a Task (Models generated, before rendering), created 2 models, each from different Connection. Created two views, but disabled the one using the connection I wanted to "Join" on.
Then loop through the pages in the script and manually built the DataTable to add the "joined" data.

This is not the best way...
The best way is to Create a LINQ data source for one connection,
Then "Add Table Links" and use that to Join on your table from other connection...
Wish I knew so I am adding my 2 cents here.
Have fun!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.