Multi table report viewer - stored-procedures

I have a stored procedure with two parameter who returns 3 tables, In report viewer I can see only first table from SP query, is there a possibility to return all 3 tables from SP query into report?
I'm currently using VS 2010
Thanking you in advanced for your help,
Gogolo

Related

Delphi FastReports - How to change Rows?

Delphi Tokyo, FastReports V5. I have a report that I cannot seem to get correct. The report is showing information for 1 sales rep. It contains two Master Data bands and 1 detail data band. Within Delphi, the pseudo code looks like this:
For each sales rep in table
Get Rep ID
Filter ActiveOrders DataSource based on rep ID
Load report definition
Execute report
Export Report to PDF
Next Sales Rep
This works fine for a simple report, such as one that only has a single MasterData band. My report is a little more complex. Specifically, it has two MasterData bands, which are only slightly related. The first band works fine with the pseudo code above. The second band is ONLY a graph. The graph has 4 datasources, because each datasource is tied to a series (aka each datasource adds a different line to the graph). I cannot figure out how to handle the coordination of the data.
My report looks like this.
As an example... the rep is Bob. Bob has 6 active orders, which shows up fine in the top MasterData band, as 6 rows of data. Of those 6 active orders, there are 3 separate companies. I want a graph of each company (in MasterData2). Below each graph, I want detailed data about the orders for that company. I want this to show up as
Graph of Company 1
Details of Company 1
Graph of Company 2
Details of Company 2
Graph of Company 3
Details of Company 3
I can write the queries to get the correct data. I just can't figure out HOW to coordinate the data changing. Since the MasterData2 is a graph, I can't return the data for all 3 companies, or FastReports will try to graph all the rows. How do I tell MasterData2 WHICH data to look at, and how do I tell it that there are more companies to graph (aka another Master/Detail) set to process?

SSRS Only Showing 1 Instance of Report, Expecting Multiple

I'm new to SSRS so forgive me if this is an obvious answer. I'll try and simplify my problem as best I can:
I have a report that's based off of a query. On that report it has the fields Account ID and Mail Date from that query on the page. Not a tablix, just the fields.
When I run the query on the DB, it will return 100 records, so 100 distinct Account ID and Mail Date pairs.
When I run the report, I only get one instance of the report, the very first Account ID/Mail Date pair. I was expecting 100 instances of the report, one for each the Account ID/Mail Date pairs (that's how it worked in Oracle Forms, which I'm trying to convert).
Is there a configuration or setting I'm missing to get the expected behavior?
Thanks.
I see a few people have viewed this so here's the solution I used:
I created another report with my dataset, put a table on that report, set it break after each record, then put a subreport on the table that contained the original report and passed all the dataset values from the table to the subreport.
The subreport was then created with 1 record per page as I wanted.

BI Publisher report using RTF template

Detail about the scenario is like I am clubbing the 10 tables queries into one data model after that in RTF template I have develop 5 different reports with the sample XML of same data-model but here I need to filter each report with 5 different parameter. which, I don't get exactly how to achieve ....?
For example :- 1st report to be filter with booking-date & 2nd report to be filter with category-id='1001' & 3rd report to be filter with category-id in ('2001','2003','2004'.......)
You can give the filter criteria within square brackets in your foor loops.
eg: <?for-each:root[category-id='1001]?>
Will filter only those nodes which meet that criteria. Of course the actual command will depend on the schema of your data.

FastReport 5 Master/Detail band print master on new page

I created a report with a master band and a detail band, both connected to datasource and table. The 2 tables are master/detail. The first table(Table1) has 1 record and the second(Table2) has 2 records. Now I can print one page for each record in Table2, but the master band is only on the first page. I need to print the master band on the second page too. Is there a way to do this?
I'm using Delphi XE8 and FastReport 5. I used to do it in Rave and Delphi 7 but I can't find how to do it with FastReport.
Ok what you can do is, is loop through the records and generate one report for each row and then concatenate the reports together with preparereport(False) and then once you have have all the reports made you can just use Showpreparedreport

Crystal Reports parameterized queries

The company I work for is using MacolaES for an ERP system. The SQL Server database is structured such that when things are no longer considered active, they are moved from a set of "active" tables to a set of "history" tables. This helps to keep the "active" tables small enough that queries return quickly. On the flip side, the history tables are enormous. The appropriate columns are indexed in these tables, and if you query for something specific it returns quickly.
The problem is when you make a Crystal Report, which is prompting the user for a parameter. For reasons not known to me, Crystal parameters are not translated into SQL parameters, so you end up with queries selecting everything from the order header history table inner joined to everything in the order lines history table, which results in over 8 million rows.
Is there a way to get Crystal Reports to use the parameters in the SQL query instead of loading all the records and filtering after the fact? I read somewhere that a stored procedure should work, but I'm curious if an ordinary parameterized query is possible in the interest of saving my time.
Here is the selection formula:
(
trim({Orderheader.ord_no}) = {?Order No}
)
and
(
{Orderheader.ord_type} = 'O'
)
and
(
{orderlines.ord_type} = 'O'
)
In Crystal Reports top menu go to Report / Selection Formulas / Record... There you can add a formula similar to:
{table.field1} = {?Parameter1} and {table.field2} = {?Parameter2}
That will add the condition to the where statement of the SQL query that the report will use to pull the rows.
To verify what is the condition in the where statement that the report is using to pull the data you can go to the menu database / Show SQL Statement. That way you can verify that the report is using the parameters in the filter.
Crystal Reports 8.5 User Guide mention the following tips:
To push down record selection, you
must select “Use Indexes or Server for
Speed” in the Report Options dialog
box (available on the File menu).
In record selection formulas, avoid data
type conversions on fields that are
not parameter fields. For example,
avoid using ToText( ) to convert a
numeric database field to a string
database field.
You are able to push down some record selection formulas
that use constant expressions.
Your formula has a TRIM function on a field. The function against the field does not allow Crystal to push the formula to the database because is not a constant expression.
If you really need to trim the order number field you should do it using SQL Expressions.
References:
Check out this article.

Resources