Showing posts with label dataset. Show all posts
Showing posts with label dataset. Show all posts

Friday, March 30, 2012

Print Name (field from dataset) On Every Page (Page Header)

Hello,

I am using the ReportViewer control and Client-Side Processing to display a Training Report that works great.

However, I need find a way to have one of the fields of my dataset display on every page of the report (Page Header).

I receive this message "The Value expression for the textbox FName refers to a field. Fields cannot be used in page headers or footers".

Is there a way to get this field to appear on every page of the report (preferably at the top).

Thanks for any help that you can provide me.

This is easy all what you need to to is to add ne parameters which get his value from your dataset fileds and then use this parameters in your page header or footer read this turtorial it will help you

http://technet.microsoft.com/en-us/library/bb508810.aspx

read the section titled " Assigning report parameter values using consolidated fields "

|||

hey

I told the answerin different post ( http://forums.asp.net/t/1160246.aspx ), but repeat it for you

you should define a Parameter for your report from Layout section ,then ( right click insome empty place in outeside of your report table, you'll see a context menu with 4 Items , select the Report Parameter) ,then create a Textbox inside your Header or Footer , then rightclick onthe textbox and and select Expression , then put the followingcode in it .

=Parameters!ReportFooterParameterName.Value

goodluck ,|||

I appreciate the help. I am not quite sure what to do when setting up the Report Parameters to fill this textboxt with the field from my dataset. Would you mind giving me a little guidance in this area?

I am getting the message A Value expression used for the report parameter 'Name' refers to a field. Fields cannot be used in report parameter expressions.

Thanks again!

|||

ok ,

let me describe it for you

there is 2 different type of value in reporting server ,

1 ) the filed that you provide by DataBase that will display like Filelds!DBFiledName.Value

2 ) the filed that you provide by getting information fromuser or from yourexisting Query this type of values called Parameters and will display asParameters!ReportFooterParameterName.Value

when you want to show oneparameter inHeader orFooter ,you can't useFields it means all the textbox that you put in header / footer , shouldcomplete byParameters ,

for sending parameters to header or footer , you have2 option ,

Take it FromUser or programmatically fill the Parameter , in commonly uses , we set the parameters Programatically , like

@.myParameter = "hello world!"

when I use the myParameter in Header, itwill display thehello world! ,

but if youuse the Fields inHeader or Footer it cousean error thatyou taken it .

for sending a parameter to your header , pleaseread the post above ,

Thank you , 7 Goodluck

Wednesday, March 28, 2012

Print each tables in new page Options

Hi All,

I have a report which has four tables in it. But I have only one
Dataset. Since this dataset has more then 30 fields, I have divided
this into four tables to be shown in a report. This will help the user
to take print of the report and place each print out side by side for
view.

Showing each table in a new page is just fine. It works. But when we
take print out some times rows of second table are printed in same
page that shows rows of first table.

With this user can not put each print out side by side for view.

Is there any way to set option like print each table in new page? I
mean to say after printing first table, second table print should
start at new page.

Thanks in advance.

This is actually pretty easy (if it is what I think it is). I did this the other day with the same amount of data you are dealing with. Just get to the table's property pop-up menu and under the "General" tab click the check box next to "Insert a page break after this table". That should do the job for you. But I would suggest putting the tables directly under each other if you have manually spaced them out onto each page. This way you won't have awkward whitespace at the beginning of each page. Let me know if this helps you.|||

Thanks for the reply.

I forgot to mention one point. I have set visibility property on tables. Will this visibilty property affects how pages are printed?

Regards,

|||Yes, the visibility will most likely affect your formatting. I'm assuming you're using the dynamic visibility function for each table, as opposed to just a child object of the table. In this case it is harder to give you a solution. The reason is because SSRS 2005 is not capable of dynamic table relocation. If you could give me more specifics about which objects are dynamically visible then I might be able to offer a solution to your problem.|||

The whole table visibility is set through expression based on user input.

The report has large number of fields to be shown. If user selects Print format then these four tables will be shown to user to and user can take print out of the same. If user selects export format then all fields will be shown in one table and the above mentioned 4 tables will be hidden.

But report is shown properly. All four tables are shown in new page if user selects Print option. Page break is OK. While printing, report is printed continuously. No Page breaks while printing.

Is there anyother approach to this problem?

Saturday, February 25, 2012

preview tab does not display bound data

I have a table in my report that is bound to a dataset which in turn is bound
to a stored procedure. When I preview the report, the table remains blank,
despite the fact that I have bound the columns from my dataset to the table
on my report.
I get the following warning in my debug summary:
The data set â'DatasetNameâ' contains a definition for the field â'FieldName.
This field is missing from the returned result set from the data source.
However, I'm sure the result set is returning this field.
Any ideas on what could cause this?
Thanks.i figured out what the problem was. i did not properly bind the dataset.
"momo" wrote:
> I have a table in my report that is bound to a dataset which in turn is bound
> to a stored procedure. When I preview the report, the table remains blank,
> despite the fact that I have bound the columns from my dataset to the table
> on my report.
> I get the following warning in my debug summary:
> The data set â'DatasetNameâ' contains a definition for the field â'FieldName.
> This field is missing from the returned result set from the data source.
> However, I'm sure the result set is returning this field.
> Any ideas on what could cause this?
> Thanks.

Preview pane not showing data

I have a problem within the Report Designer in Visual Studio .NET. I a new
report, I define a dataset that returns data via a SQL query fine. I design
the report without issues, but when I try to preview the report, no data is
displayed.
This error seems to have occured after applying reporting services SP1 to my
machine. No errors are reported, and nothing appears in the event log.
Any ideas as to how I can correct this problem out there?
Thanks in advance.
MattIs there an .rdl.data file in the same directory as your .rdl file? If so, delete it and try again.
Also, does hitting the Refresh button in the preview pane have any effect?
--
Thanks.
Donovan R. Smith
Software Test Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matt Pothier" <Matt.Pothier@.sonepar-us.com> wrote in message
news:eEtr8WvfEHA.596@.TK2MSFTNGP11.phx.gbl...
> I have a problem within the Report Designer in Visual Studio .NET. I a new
> report, I define a dataset that returns data via a SQL query fine. I design
> the report without issues, but when I try to preview the report, no data is
> displayed.
> This error seems to have occured after applying reporting services SP1 to my
> machine. No errors are reported, and nothing appears in the event log.
> Any ideas as to how I can correct this problem out there?
> Thanks in advance.
> Matt
>|||Thanks for the response. There were .rdl.data files in the same directory.
I tried deleting them, but got the same results. The refresh button did not
help either.
In a moment of frustration I uninstalled reporting services; performed a
repair install on VS .Net, reinstalled Reporting services; applied the
service pack and started over again. Everything seems to be working now.
"Donovan R. Smith [MSFT]" <donovans@.online.microsoft.com> wrote in message
news:%23iGKIuvfEHA.3556@.TK2MSFTNGP12.phx.gbl...
> Is there an .rdl.data file in the same directory as your .rdl file? If
so, delete it and try again.
> Also, does hitting the Refresh button in the preview pane have any effect?
> --
> Thanks.
> Donovan R. Smith
> Software Test Lead
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Matt Pothier" <Matt.Pothier@.sonepar-us.com> wrote in message
> news:eEtr8WvfEHA.596@.TK2MSFTNGP11.phx.gbl...
> > I have a problem within the Report Designer in Visual Studio .NET. I a
new
> > report, I define a dataset that returns data via a SQL query fine. I
design
> > the report without issues, but when I try to preview the report, no data
is
> > displayed.
> >
> > This error seems to have occured after applying reporting services SP1
to my
> > machine. No errors are reported, and nothing appears in the event log.
> >
> > Any ideas as to how I can correct this problem out there?
> >
> > Thanks in advance.
> >
> > Matt
> >
> >
>

preview layout diferent than server layout

i am using reporting serveces :
i created a DataExtension to get a dataset's value in the report as an
xml input file (this works)
1. i am designing the report using this dataset's values and some
calculated expressions like "runningvalue" everything works fine in
the preview button but when the report is called from my c#
application the "runningvalue" is not being calculated while all the
other data is calculated.
2. the data in my report table is in groups were some groups must be
desplayed others hidden ,acccording to the xml values, as well as some
tables must be displayed otheres hidden in the preview button of the
report this works but also when the report is called from my c#
application all the tables and the groups are displaued which MUST NOT
HAPPEN
what can i do to fix this?
pls help
i need it urgently and i have been working on it for like a lot
by the way,
this is how i am calling the render: from my c# application :
proxyParameters[0] = new STB.testlab02.ParameterValue();
proxyParameters[0].Name = "DataSource";
//System.Data.DataSet dsetReport = new System.Data.DataSet();
DataSet dsReportMO = new DataSet();
dsReportMO.ReadXml("c:\\DataExt\\dsReport.xml");//dsReportMO.GetXml();
proxyParameters[0].Value = dsReportMO.GetXml();
// Build device info based on the start page
deviceInfo = String.Format(@."<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>",
"emf");
//Exectute the report and get page count.
try
{
// Renders the first page of the report and returns streamIDs for
// subsequent pages
firstPage = repServ.Render(reportPath, format,
null,deviceInfo,proxyParameters,null,null,out encoding,out
mimeType,out reportHistoryParameters, out warnings, out streamIDs);
.
.
.i still cant find a solution pls help!!!!!!!
how can this work
////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
mireille.azar@.ifsal.com (Mireille) wrote in message news:<63c1f241.0408250057.12d85680@.posting.google.com>...
> i am using reporting serveces :
> i created a DataExtension to get a dataset's value in the report as an
> xml input file (this works)
> 1. i am designing the report using this dataset's values and some
> calculated expressions like "runningvalue" everything works fine in
> the preview button but when the report is called from my c#
> application the "runningvalue" is not being calculated while all the
> other data is calculated.
> 2. the data in my report table is in groups were some groups must be
> desplayed others hidden ,acccording to the xml values, as well as some
> tables must be displayed otheres hidden in the preview button of the
> report this works but also when the report is called from my c#
> application all the tables and the groups are displaued which MUST NOT
> HAPPEN
> what can i do to fix this?
> pls help
> i need it urgently and i have been working on it for like a lot
>
> by the way,
>
> this is how i am calling the render: from my c# application :
>
> proxyParameters[0] = new STB.testlab02.ParameterValue();
> proxyParameters[0].Name = "DataSource";
> //System.Data.DataSet dsetReport = new System.Data.DataSet();
> DataSet dsReportMO = new DataSet();
> dsReportMO.ReadXml("c:\\DataExt\\dsReport.xml");//dsReportMO.GetXml();
> proxyParameters[0].Value = dsReportMO.GetXml();
> // Build device info based on the start page
> deviceInfo = String.Format(@."<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>",
> "emf");
> //Exectute the report and get page count.
> try
> {
> // Renders the first page of the report and returns streamIDs for
> // subsequent pages
> firstPage = repServ.Render(reportPath, format,
> null,deviceInfo,proxyParameters,null,null,out encoding,out
> mimeType,out reportHistoryParameters, out warnings, out streamIDs);
> .
> .
> .|||i found the solution...

Preview doesn't return records like it does under data tab

I have a problem where have a report that uses a shared datasource that
references a SQL Server. My dataset called a stored procedure that builds a
sql string and passes in the string to an openquery() command that queries a
DB2 database that is a linked server on that same SQL Server. The results
show up fine on the data tab when I run it, but when I try to preview the
report I get the column headers but no fields show up. The query takes time
to complete (under 2 minutes) I'm only returning 200 rows with under maybe 6
columns and the preview mode indicates from the number of pages (6) that it
knows some data should be returned. But none of the data is populating in
the table. I've been on with Microsoft Tech Support going on three weeks
now and they are clueless. Anyone have any idea why this is happening? I
can view reports that are querying the linked server database w/o the stored
proc. I get no error message just no data.Are you using a table to view the data?
Have you tried deploying the report to make sure it is not a development
environment issue?
There is a cache of the data used for preview. Look in the directory where
you report is stored. Delete the .data file for the report and see if that
makes any difference.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jennifer" <Jennifer@.discussions.microsoft.com> wrote in message
news:EABA6B8A-7EE0-4125-B0CE-947A401EBFA0@.microsoft.com...
>I have a problem where have a report that uses a shared datasource that
> references a SQL Server. My dataset called a stored procedure that builds
> a
> sql string and passes in the string to an openquery() command that queries
> a
> DB2 database that is a linked server on that same SQL Server. The results
> show up fine on the data tab when I run it, but when I try to preview the
> report I get the column headers but no fields show up. The query takes
> time
> to complete (under 2 minutes) I'm only returning 200 rows with under maybe
> 6
> columns and the preview mode indicates from the number of pages (6) that
> it
> knows some data should be returned. But none of the data is populating in
> the table. I've been on with Microsoft Tech Support going on three
> weeks
> now and they are clueless. Anyone have any idea why this is happening? I
> can view reports that are querying the linked server database w/o the
> stored
> proc. I get no error message just no data.|||Figured it out. The fields weren't populating with a stored proc. Added the
fields (case sensitive) and made sure they were mapped to the database names.
Then my data started populating on the previewed report. Microsoft figured
out for me.
"Jennifer" wrote:
> I have a problem where have a report that uses a shared datasource that
> references a SQL Server. My dataset called a stored procedure that builds a
> sql string and passes in the string to an openquery() command that queries a
> DB2 database that is a linked server on that same SQL Server. The results
> show up fine on the data tab when I run it, but when I try to preview the
> report I get the column headers but no fields show up. The query takes time
> to complete (under 2 minutes) I'm only returning 200 rows with under maybe 6
> columns and the preview mode indicates from the number of pages (6) that it
> knows some data should be returned. But none of the data is populating in
> the table. I've been on with Microsoft Tech Support going on three weeks
> now and they are clueless. Anyone have any idea why this is happening? I
> can view reports that are querying the linked server database w/o the stored
> proc. I get no error message just no data.