Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Wednesday, March 28, 2012

Report with multiple columns won't print in portrait

I have a report that has 6 columns and won't print in potrait mode. I have
set the page width to 8.5in and the page height to 5in. If I set the page
height to 11in it prints OK (but I need to limit the height to 5in.
Also, can I use this report as the report source for a subreport control?
Thanks,On Sep 11, 1:59 pm, "Tim Kelley" <tkel...@.company.com> wrote:
> I have a report that has 6 columns and won't print in potrait mode. I have
> set the page width to 8.5in and the page height to 5in. If I set the page
> height to 11in it prints OK (but I need to limit the height to 5in.
> Also, can I use this report as the report source for a subreport control?
> Thanks,
You might try modifying the Report Properties Layout, if you haven't
already: via: Layout view -> Report drop-down -> Report Properties... -
> Layout tab -> Page height:, Top margin:, Bottom margin:. If you are
using columns, reduce the Spacing: property. For the subreport
control, you can use the report; however, it it has report columns,
once it is exported it will remove the columns automatically. This is
evidently a flaw in the export functionality. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

report viewer web.config settings for remote mode without session state

Hi
I am using the new report viewer control that comes with VS2005. My
application does not use session state as it is clustered and so I have been
following the Microsoft article for implementing the IReportViewerConnection
and then adding a key for the ReportServerConnection in the web.config file.
http://msdn2.microsoft.com/en-us/library/ms251661.aspx
My implementation of the interface is called ReportServerConnection and is
within a namespace called eNate.ESP.ESPWeb.
In my web.cofig file I have the following key
<add key="ReportViewerServerConnection"
value="eNate.ESP.ESPWeb.ReportServerConnection, ReportServerConnection" />
When I try to load the asp.net page which contains the report viewer control
I get the following error message
Microsoft.Reporting.WebForms.InvalidConfigFileTypeException: The type
eNate.ESP.ESPWeb.ReportServerConnection,
eNate.ESP.ESPWeb.ReportServerConnection does not implement
IReportServerConnection or could not be found.
I am definately implementing the interface but which ever way I try to
reference the class in the web.config key I always get this error.
The documentation about how to add this key file is not very clear and I
have not seen any other posts about this subject.
Could somebody please let me know how to reference this class correctly as I
think that is causing the error.
Thanks
Lewis Holmes
eNateHi Lewis,
Welcome to the MSDN newsgroup.
As for the custom IReportServerConnection class, we need to specify the
AssemblyQualified name which include the Class's full name, assembly name,
version, culture and publickeytoken info. For example:
<add key="ReportViewerServerConnection"
value="ControLibrary.SimpleReportServerConnection, ControLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
You can printout the class's assemblyQualified name through the below code:
Response.Write("<br/>" +
typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
In addition, I agree that the document about the ReportViewer web.config
interfaces is not quite complete and sufficient. I suggest you also submit
this to the msdn product feedback center:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
If there is anything else we can help, please feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks so much Steven!
I have got it to work now.
Regards
Lewis Holmes
eNate
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:ZYha8E$RGHA.6904@.TK2MSFTNGXA03.phx.gbl...
> Hi Lewis,
> Welcome to the MSDN newsgroup.
> As for the custom IReportServerConnection class, we need to specify the
> AssemblyQualified name which include the Class's full name, assembly name,
> version, culture and publickeytoken info. For example:
> <add key="ReportViewerServerConnection"
> value="ControLibrary.SimpleReportServerConnection, ControLibrary,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
> You can printout the class's assemblyQualified name through the below
> code:
> Response.Write("<br/>" +
> typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
> In addition, I agree that the document about the ReportViewer web.config
> interfaces is not quite complete and sufficient. I suggest you also submit
> this to the msdn product feedback center:
> http://lab.msdn.microsoft.com/productfeedback/default.aspx
> If there is anything else we can help, please feel free to post here.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>sql

Friday, March 23, 2012

Report Viewer Control in Local Mode ?

I run my reports in local mode and do something like this :

Code Snippet

//Local Processing mode for Reports

reportViewer.ProcessingMode = ProcessingMode.Local;

// Set RDL file based on handout/grid selected

if (gridRadioButton.Checked)

{

reportViewer.LocalReport.ReportPath = "Grid.rdlc";

}

else

{

//Handout

reportViewer.LocalReport.ReportPath = "Handout.rdlc";

}

//Refresh the report in order to show it to the user.

reportViewer.RefreshReport();

The problem is that both handout and grid is diiferent, Say User Selects the grid once it always shows the grid report. Even second time you change to handout still it shows the same Grid format and I debugged it and it picks the new report path but doesn't help? The application needs to be rerun to fix it.

Can anyone explain what is causing this and how to get rid of it.

Thanks,

Harsimrat

There are a couple of things you need to do:

1) I assume that the user can move back and forth between the reports at will? Not just change once? Therefore you should be checking to see if the user has actually *changed* before doing the appropriate reinitialization (IOW, do a comparison between current and new values)...

2) Reinitialization looks something like this:

Use the ReportViewer.Reset() method -- this is probably the bit you are missing Set the appropriate ReportPath, assuming these are not embedded resources, otherwise you want to set that Rebind the datasources -- this may or may not be required|||I tried adding Reset() and then it tells me cannot find the dataset. But without Reset() it runs fine. I think I need to rebind it somehow as my initial binding is done automatically. If you can please give an code example ?|||

Um, I did say you probably needed to re-bind... I think...

I would forget about the "automatically" bound altogether if you are switching between reports. But this is one of the reasons I told you to check to see whether they had actually *switched* reports -- because you don't want to do the reset and rebind if they have chosen the same report twice in a row. Does that make sense?

I will show you a code example in two parts. The first part shows you where I am actually refreshing the data, previous to changing the report. In my case the procedures for doing so are different depending on whether the source is a local XML file or from a data server --

I will pseudo code some parts of it that are not relevant to you... but this happens to be the reason why I need to switch reports in this particular form.... it doesn't matter that your reason is different, as it will still give you the idea of what you need to do, even in cases (like mine) that the datasets might be entirely different.

Code Snippet

If tsSourceIsServerInfo Then
Me.GetDataSetFromServer()
If [...] the last time they used a different report Then

Me.ReinitializeViewer(tThisReportName)
Else
Me.ReportViewer1.Visible = True ' it might not have been previously
End If
Else
Me.DataSet1.Reset()
Me.DataSet1.ReadXml(tsSource)
If [...] the last time they used a different report as above Then

Me.ReinitializeViewer(tThisReportName)
Else
Me.ReportViewer1.Visible = True
End If
End If

' carry on with initializing params here, then

Me.ReportViewer1.RefreshReport()

OK so far?

You see that the re-initialization is only done where necessary. Now for what happens inside the initialization:

Code Snippet

Private Sub ReinitializeViewer(ByVal tsReport As String)
Dim ReportDataSourceX = _

New Microsoft.Reporting.WinForms.ReportDataSource()
Me.ReportViewer1.Reset()
Me.ReportViewer1.LocalReport.ReportEmbeddedResource = tsReport

' change above line to

' Me.ReportViewer1.LocalReport.ReportPath = tsReport

' if not embedded

If tsReport is a certain report Then

ReportDataSourceX.Name = "Appropriate name for the data set for it"
ReportDataSourceX.Value = Me.BindingSourceDatabase
Else
ReportDataSourceX.Name = "Appropriate name here"
ReportDataSourceX.Value = Me.BindingSourceXML
End If


Me.ReportViewer1.LocalReport.DataSources.Add(ReportDataSourceX)
Me.ReportViewer1.Visible = True

End Sub

HTH,

>L<

Report Viewer authentication

Hello,

I am trying to create a simple ASP page to navigate in the reports stored in the report server. If I work in debug mode everything is fine. The page is working and If I call for a report I can see it perfectly. If I publish the report on my test machine (Windows XP Sp2 so IIS 5.1) I see that IE is connecting me with the ASP net user and not the correct one (myself) that is authorized to see the reports. Anybody knows how to solve it?


Thank you!

Andrea Pagliano

If you need the interactive user identity to be propagated to the Report Server, in your app web.config set <indentity impersonate="true"/>. This won't work if the Report Server is ona different machine though unless you enable Kerberos. There are other options as explained here.|||

Thank you very much! That did it!


Thanks again

Andrea Pagliano

Report Viewer

Hi,

I am new to using Report Viewer.

I created a basic report (Local Mode) using Report vIewr control in VS 2005 and typed dataset and it works fine.

But I would like to view a report with a parameter.

Can anyone explain me how to do that and bind it with the report viewer?

Thanks & Regards,

Lavanya.

Do you want to set parameters from your code?

|||

In the ASPX right after the

see the object source code and replace with your stuff

<asp:ObjectDataSourceID="ObjectDataSource2"runat="server"

SelectMethod="GetData"

TypeName="DataSetOTDTableAdapters.DataTableOTDFamilyTableAdapter">

<selectparameters>

<asp:querystringparametername="FromDate"querystringfield="FromDate"defaultvalue="01/01/2007"/>

<asp:querystringparametername="ToDate"querystringfield="ToDate"defaultvalue="07/01/2007"/>

</selectparameters>

</asp:ObjectDataSource>

that coresponds to a getdate method in the dataset that has 2 parameters @.FromDate and @.ToDate

You can also change the values of parameters in the PageInit event.

|||

I want to set the parameters in the report.rdlc.

I got one parameter working.

I have two textboxes. I have to see the report for a specific date range.

How can I do that?

For a single date, I set the operator in the filter as =.

What if I want to use two parameters (date range).

How do I set it in report.rdlc?

|||

I am assuming you are not using Crystal Reports. How do you fill the dataset? Can you supply the range parameters to the dataset instead of reportviewer? Also see if filtering works for you:

http://msdn2.microsoft.com/en-us/library/ms252125(VS.80).aspx

As I suggested, filtering data before report is rendered is a better option.

|||

Hi, I have a matrix report with rows as a name and the column as a date field.

When i run the report it works the way i want.

08/03/2007 07/31/200708/01/2007Adams , William484Anderson , David480Asseng , Steve440Bangerd , Michael048Barnaskas , Joe000Barry , Timothy084Berry , Jerry404Bowen , Nels000Breakall , Jeff4012Brockel , Robert048Campbell , Bryan000Castro , Carlos000Childs , Michael8124Conklin , Terry888

But when I give the parameter as the date(08/03/2007), I am not gettin the rows with 0. What am i doin wrong?

|||

Are you doing the filtering as suggested in that article?

|||

Yeah I create report parameters and then I include filters in the matrix.

|||

Am just curious, 0 implies there is no record or value for that date, right? So that means filter works as it should. Or, what do those values mean?

|||

Yeah... 0 means the count of the entries for that date is 0. If it is 4 it means the count of entries for that date and for that tech is 4.

Now when i dont include any parameters, I get the 0 entries also.

I need the same thing when i include my date parameter.. is it possible?

|||

I am sorry but maybe I am not getting it right. What is the purpose of a filter if you want to display all the values. Let me look into it and I will get back to you if I find something.

|||

It is just similar to the one without parameter. I add an parameter So that I can see the data only for that date. Now it is shoeing all dates...

|||

Lets backtrack. Is filtering working for you or not?

|||

Yeah it works. But the problem is it doesn not show me the columns with 0 .

|||

Let me put it crisp.

What I am trying to do is a Compliance report. If the tech comes in for that day he is compliant, if not he is not compliant.

So what I did was I did a matrix report with rows as Technician Name , Columns as Date and data as Count(Date)

It worked perfect. The result is shown below.

07/31/200708/01/200708/02/2007Adams , William848Anderson , David804Asseng , Steve404Bangerd , Michael488Barnaskas , Joe000Barry , Timothy844Berry , Jerry044Bowen , Nels000Breakall , Jeff0124Brockel , Robert4812Campbell , Bryan000Castro , Carlos000Childs , Michael1244Conklin , Terry888Contractor , Contractor000Cooke , Jackie000DeLeon , Carlos8120Dorn , Craig400Ehrlich , Chase000Elswick , James000English , Mike400Ewing , David000Favalora , Anthony41212Fierke , Bruce000Figueroa , Richard000

Now I need to include parameter to show the report for a specific date. In our example let us take 7/31/2007

I included report parameters for the report and filters for the matrix where Fields!Date.Value=Parameter!Date.Value

I have a textbox and a button in my aspx page.

On button click

Dim pubAs Microsoft.Reporting.WebForms.ReportParameter

Dim pubdateAsString = TextBox1.Text

pub =New Microsoft.Reporting.WebForms.ReportParameter("Arrival_Time", pubdate)Me.ReportViewer1.LocalReport.SetParameters(New Microsoft.Reporting.WebForms.ReportParameter() {pub})

ReportViewer1.LocalReport.Refresh()

And then I run the report with 07/31/2007 in the textbox and hit the button. I dont get

Barnaskas , Joe

Berry , Jerry

Bowen , Nels

Breakall , Jeff

Campbell , Bryan

Castro , Carlos

Contractor , Contractor

Cooke , Jackie

Ehrlich , Chase

Elswick , James

etc..,

because the count is 0.

Hope I explained it at my best. Please help.

Monday, February 20, 2012

Report runs in the frontend but not in designer!!??

The report gives me a blank screen when I refresh the data under the design mode, but when I run it with my access tool, the data comes out fine.
The report is running on a complex query in an access database.Open the report and do verify database